- procedure TFPGMap.PutKey(Index: Integer; const NewKey: TKey);
- begin
- inherited PutKey(Index, @NewKey);
- end;
- procedure TFPSList.QuickSort(L, R: Integer; Compare: TFPSListCompareFunc);
- var
- I, J, P: Integer;
- PivotItem: Pointer;
- begin
- repeat
- I := L;
- J := R;
- P := (L + R) div 2;
- repeat
- PivotItem := InternalItems[P];
- while Compare(PivotItem, InternalItems[I]) > 0 do
- Inc(I);
- while Compare(PivotItem, InternalItems[J]) < 0 do
- Dec(J);
- if I <= J then
- begin
- InternalExchange(I, J);
- if P = I then
- P := J
- else if P = J then
- P := I;
- Inc(I);
- Dec(J);
- end;
- until I > J;
- if L < J then
- QuickSort(L, J, Compare);
- L := I;
- until I >= R;
- end;