mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-08 22:31:34 +01:00
Fix compilation on targets without Random: add $ifdef FPC_HAS_FEATURE_RANDOM
git-svn-id: trunk@41245 -
This commit is contained in:
parent
fce57c5528
commit
4d8dcfc42e
@ -102,7 +102,7 @@ const
|
||||
predict). If these risks cannot be tolerated, a different
|
||||
sorting algorithm should be used.
|
||||
}
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_RANDOM}
|
||||
procedure RandomizedQuickSort_PtrList_NoContext(
|
||||
ItemPtrs: PPointer;
|
||||
ItemCount: SizeUInt;
|
||||
@ -131,6 +131,7 @@ const
|
||||
ItemListSorter_ContextComparer: @RandomizedQuickSort_ItemList_Context;
|
||||
ItemListSorter_CustomItemExchanger_ContextComparer: @RandomizedQuickSort_ItemList_CustomItemExchanger_Context;
|
||||
);
|
||||
{$endif def FPC_HAS_FEATURE_RANDOM}
|
||||
|
||||
implementation
|
||||
|
||||
@ -374,6 +375,7 @@ end;
|
||||
{*****************************************************************************
|
||||
Randomized QuickSort
|
||||
*****************************************************************************}
|
||||
{$ifdef FPC_HAS_FEATURE_RANDOM}
|
||||
|
||||
function Random_SizeUInt(L: SizeUInt): SizeUInt;
|
||||
begin
|
||||
@ -671,5 +673,6 @@ begin
|
||||
exit;
|
||||
QuickSort(0, ItemCount - 1);
|
||||
end;
|
||||
{$endif def FPC_HAS_FEATURE_RANDOM}
|
||||
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user