|
@@ -770,7 +770,7 @@ begin
|
|
var DoAddWordToList := True;
|
|
var DoAddWordToList := True;
|
|
if ScriptFuncHasParameters(ScriptFunc) then begin
|
|
if ScriptFuncHasParameters(ScriptFunc) then begin
|
|
var Key := String(ScriptFuncName);
|
|
var Key := String(ScriptFuncName);
|
|
- if FScriptFunctionsByName[ClassMembers].ContainsKey(Key) then begin
|
|
|
|
|
|
+ if not FScriptFunctionsByName[ClassMembers].TryAdd(Key, [ScriptFuncWithoutHeader]) then begin
|
|
{ Function has multiple prototypes }
|
|
{ Function has multiple prototypes }
|
|
var ScriptFunctions := FScriptFunctionsByName[ClassMembers][Key];
|
|
var ScriptFunctions := FScriptFunctionsByName[ClassMembers][Key];
|
|
var N := Length(ScriptFunctions);
|
|
var N := Length(ScriptFunctions);
|
|
@@ -778,8 +778,7 @@ begin
|
|
ScriptFunctions[N] := ScriptFuncWithoutHeader;
|
|
ScriptFunctions[N] := ScriptFuncWithoutHeader;
|
|
FScriptFunctionsByName[ClassMembers][Key] := ScriptFunctions;
|
|
FScriptFunctionsByName[ClassMembers][Key] := ScriptFunctions;
|
|
DoAddWordToList := False; { Already added it when the first prototype was found }
|
|
DoAddWordToList := False; { Already added it when the first prototype was found }
|
|
- end else
|
|
|
|
- FScriptFunctionsByName[ClassMembers].Add(Key, [ScriptFuncWithoutHeader]);
|
|
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
if DoAddWordToList then
|
|
if DoAddWordToList then
|
|
AddWordToList(SL, ScriptFuncName, awtScriptFunction);
|
|
AddWordToList(SL, ScriptFuncName, awtScriptFunction);
|