mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 23:48:08 +02:00
SynEdit: fix for fpc 3.2.2: constref vs const
This commit is contained in:
parent
3eb2c20d38
commit
18030f9183
@ -88,8 +88,13 @@ type
|
|||||||
|
|
||||||
TLazHighlighterRangeEqualityComparer = class(TInterfacedObject, ILazHighlighterRangeEqualityComparer)
|
TLazHighlighterRangeEqualityComparer = class(TInterfacedObject, ILazHighlighterRangeEqualityComparer)
|
||||||
public
|
public
|
||||||
|
{$IF FPC_Fullversion>30202}
|
||||||
function Equals(const ALeft, ARight: TLazHighlighterRangeForDictionary): Boolean; reintroduce;
|
function Equals(const ALeft, ARight: TLazHighlighterRangeForDictionary): Boolean; reintroduce;
|
||||||
function GetHashCode(const AValue: TLazHighlighterRangeForDictionary): UInt32; reintroduce;
|
function GetHashCode(const AValue: TLazHighlighterRangeForDictionary): UInt32; reintroduce;
|
||||||
|
{$ELSE}
|
||||||
|
function Equals(constref ALeft, ARight: TLazHighlighterRangeForDictionary): Boolean; reintroduce;
|
||||||
|
function GetHashCode(constref AValue: TLazHighlighterRangeForDictionary): UInt32; reintroduce;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -109,14 +114,16 @@ end;
|
|||||||
|
|
||||||
{ TLazHighlighterRangeEqualityComparer }
|
{ TLazHighlighterRangeEqualityComparer }
|
||||||
|
|
||||||
function TLazHighlighterRangeEqualityComparer.Equals(const ALeft,
|
function TLazHighlighterRangeEqualityComparer.Equals(
|
||||||
ARight: TLazHighlighterRangeForDictionary): Boolean;
|
{$IF FPC_Fullversion>30202} const {$ELSE} constref {$ENDIF}
|
||||||
|
ALeft, ARight: TLazHighlighterRangeForDictionary): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := ALeft.Compare(ARight) = 0;
|
Result := ALeft.Compare(ARight) = 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazHighlighterRangeEqualityComparer.GetHashCode(
|
function TLazHighlighterRangeEqualityComparer.GetHashCode(
|
||||||
const AValue: TLazHighlighterRangeForDictionary): UInt32;
|
{$IF FPC_Fullversion>30202} const {$ELSE} constref {$ENDIF}
|
||||||
|
AValue: TLazHighlighterRangeForDictionary): UInt32;
|
||||||
begin
|
begin
|
||||||
Result := AValue.GetHashCode;
|
Result := AValue.GetHashCode;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user