* avoid code duplication :)

This commit is contained in:
florian 2024-11-03 15:37:50 +01:00
parent 1778fb6fe3
commit 183a10b292

View File

@ -9142,13 +9142,6 @@ implementation
function TImplementedInterface.getcopy:TImplementedInterface;
function stringdup(s:pshortstring):pshortstring;inline;
begin
getmem(result,ord(s^[0])+1);
move(s^[0],result^[0],ord(s^[0])+1);
end;
var
i : longint;
begin
@ -9168,7 +9161,7 @@ implementation
result.NameMappings:=TFPHashList.create;
for i:=0 to NameMappings.Count-1 do
Result.NameMappings.Add(NameMappings.NameOfIndex(i),
stringdup(pshortstring(NameMappings.Items[i])));
stringdup(pshortstring(NameMappings.Items[i])^));
end;
if assigned(ProcDefs) then
begin