mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 15:48:03 +02:00
IDE, Identifier-Completion: fix overloaded function in history list. Issue #40332
- Adding 2 versions of an overloaded function did not work. The overloaded params were compared with different functions.
This commit is contained in:
parent
9762393535
commit
17e62ec5c0
@ -528,12 +528,14 @@ begin
|
||||
end;
|
||||
|
||||
function CompareIdentHistListItem(Data1, Data2: Pointer): integer;
|
||||
(* CompareIdentHistListItem and CompareIdentItemWithHistListItem must use
|
||||
the same functions to compare each part of the data *)
|
||||
var
|
||||
Item1: TIdentHistListItem absolute Data1;
|
||||
Item2: TIdentHistListItem absolute Data2;
|
||||
begin
|
||||
Result:=CompareIdentifiers(PChar(Pointer(Item2.Identifier)),
|
||||
PChar(Pointer(Item1.Identifier)));
|
||||
Result:=CompareIdentifierPtrs(Pointer(Item2.Identifier),
|
||||
Pointer(Item1.Identifier));
|
||||
if Result<>0 then exit;
|
||||
|
||||
//debugln('CompareIdentHistListItem ',Item2.Identifier,'=',Item1.Identifier);
|
||||
@ -541,6 +543,8 @@ begin
|
||||
end;
|
||||
|
||||
function CompareIdentItemWithHistListItem(Data1, Data2: Pointer): integer;
|
||||
(* CompareIdentHistListItem and CompareIdentItemWithHistListItem must use
|
||||
the same functions to compare each part of the data *)
|
||||
var
|
||||
IdentItem: TIdentifierListItem absolute Data1;
|
||||
HistItem: TIdentHistListItem absolute Data2;
|
||||
@ -550,7 +554,7 @@ begin
|
||||
if Result<>0 then exit;
|
||||
|
||||
//debugln('CompareIdentItemWithHistListItem ',HistItem.Identifier,'=',GetIdentifier(IdentItem.Identifier));
|
||||
Result:=SysUtils.CompareText(HistItem.ParamList,IdentItem.ParamTypeList);
|
||||
Result:=CompareTextIgnoringSpace(HistItem.ParamList,IdentItem.ParamTypeList,false);
|
||||
end;
|
||||
|
||||
function dbgs(Flag: TIdentifierListContextFlag): string;
|
||||
|
Loading…
Reference in New Issue
Block a user