mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 17:49:27 +02:00
* use SizeUInt instead of longint for the array indices in the quicksort
implementations. This: 1) allows sorting arrays with >4G elements on 64-bit systems 2) allows sorting arrays with up to 4G (>2G) elements on 32-bit systems 3) uses 16-bit instead of the less efficient 32-bit indices on 16-bit and 8-bit platforms git-svn-id: trunk@41230 -
This commit is contained in:
parent
f5f25f7ae6
commit
bea9961d2d
@ -64,10 +64,10 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
Procedure QuickSort_PtrList_NoContext(ItemPtrs: PPointer; L, R : Longint;
|
||||
Procedure QuickSort_PtrList_NoContext(ItemPtrs: PPointer; L, R : SizeUInt;
|
||||
Comparer: TListSortComparer_NoContext);
|
||||
var
|
||||
I, J, PivotIdx : Longint;
|
||||
I, J, PivotIdx : SizeUInt;
|
||||
P, Q : Pointer;
|
||||
begin
|
||||
repeat
|
||||
@ -132,9 +132,9 @@ end;
|
||||
|
||||
procedure QuickSort_PtrList_Context(ItemPtrs: PPointer; ItemCount: SizeUInt; Comparer: TListSortComparer_Context; Context: Pointer);
|
||||
|
||||
procedure QuickSort(L, R : Longint);
|
||||
procedure QuickSort(L, R : SizeUInt);
|
||||
var
|
||||
I, J, PivotIdx : Longint;
|
||||
I, J, PivotIdx : SizeUInt;
|
||||
P, Q : Pointer;
|
||||
begin
|
||||
repeat
|
||||
@ -201,9 +201,9 @@ procedure QuickSort_ItemList_Context(Items: Pointer; ItemCount, ItemSize: SizeUI
|
||||
var
|
||||
TempBuf: Pointer;
|
||||
|
||||
procedure QuickSort(L, R : Longint);
|
||||
procedure QuickSort(L, R : SizeUInt);
|
||||
var
|
||||
I, J, PivotIdx : Longint;
|
||||
I, J, PivotIdx : SizeUInt;
|
||||
P : Pointer;
|
||||
begin
|
||||
repeat
|
||||
@ -279,9 +279,9 @@ procedure QuickSort_ItemList_CustomItemExchanger_Context(
|
||||
Exchanger: TListSortCustomItemExchanger_Context;
|
||||
Context: Pointer);
|
||||
|
||||
procedure QuickSort(L, R : Longint);
|
||||
procedure QuickSort(L, R : SizeUInt);
|
||||
var
|
||||
I, J, PivotIdx : Longint;
|
||||
I, J, PivotIdx : SizeUInt;
|
||||
P : Pointer;
|
||||
begin
|
||||
repeat
|
||||
|
Loading…
Reference in New Issue
Block a user