+ added TList.Sort overload with a sorting algorithm parameter

git-svn-id: trunk@41169 -
This commit is contained in:
nickysn 2019-02-02 20:31:16 +00:00
parent c24d525b9f
commit e8dc54c768
2 changed files with 6 additions and 0 deletions

View File

@ -340,6 +340,7 @@ Type
function Remove(Item: Pointer): Integer;
procedure Pack;
procedure Sort(Compare: TListSortCompare);
procedure Sort(Compare: TListSortCompare; SortingAlgorithm: PSortingAlgorithm);
property Capacity: Integer read GetCapacity write SetCapacity;
property Count: Integer read GetCount write SetCount;
property Items[Index: Integer]: Pointer read Get write Put; default;

View File

@ -774,6 +774,11 @@ begin
FList.Sort(Compare);
end;
procedure TList.Sort(Compare: TListSortCompare; SortingAlgorithm: PSortingAlgorithm);
begin
FList.Sort(Compare, SortingAlgorithm);
end;
procedure TList.CopyMove (aList : TList);
var r : integer;
begin