From bc4f3166a47f85813d20dab3835d4d4974d0a1d7 Mon Sep 17 00:00:00 2001 From: Bergmann89 Date: Tue, 26 Jan 2016 21:07:37 +0100 Subject: [PATCH] * fixed compiler errors in generics --- uutlGenerics.pas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/uutlGenerics.pas b/uutlGenerics.pas index a7e2fac..b7ac0d9 100644 --- a/uutlGenerics.pas +++ b/uutlGenerics.pas @@ -572,6 +572,9 @@ type function utlFreeOrFinalize(var obj; const aTypeInfo: PTypeInfo; const aFreeObj: Boolean = true): Boolean; +operator < (const i1, i2: TObject): Boolean; inline; +operator > (const i1, i2: TObject): Boolean; inline; + implementation uses @@ -580,15 +583,15 @@ uses //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Helper//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -operator < (const i1, i2: TObject): Boolean; inline; +operator < (const i1, i2: TObject): Boolean; begin - result := PtrUInt(i1) < PtrUInt(i2); + result := Pointer(i1) < Pointer(i2); end; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -operator > (const i1, i2: TObject): Boolean; inline; +operator > (const i1, i2: TObject): Boolean; begin - result := PtrUInt(i1) > PtrUInt(i2); + result := Pointer(i1) > Pointer(i2); end; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////