mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 18:58:12 +02:00
SynEdit: fix compare function
git-svn-id: trunk@61157 -
This commit is contained in:
parent
80f32f0ac9
commit
eb2966c1f0
@ -30,7 +30,7 @@ uses
|
||||
Classes, Graphics, Controls, LCLProc, LCLType, LCLIntf, Forms, LMessages,
|
||||
FPCanvas, sysutils, math, SynGutterBase, SynEditTypes, LazSynEditText,
|
||||
SynEditTextBuffer, SynEditMarks, SynEditMiscClasses, SynEditFoldedView,
|
||||
SynEditMouseCmds;
|
||||
SynEditMouseCmds, LazUtilities;
|
||||
|
||||
type
|
||||
TSynGutterLineOverview = class;
|
||||
@ -349,9 +349,7 @@ begin
|
||||
if Result <> 0 then exit;
|
||||
Result := Column - Other.Column;
|
||||
if Result <> 0 then exit;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := Integer(PtrUint(self) - PtrUInt(Other));
|
||||
{$POP}
|
||||
Result := ComparePointers(Pointer(self), PtrUInt(Other)));
|
||||
end;
|
||||
|
||||
function TSynGutterLOvMark.CompareByLine(Other: TSynGutterLOvMark): Integer;
|
||||
@ -362,9 +360,7 @@ begin
|
||||
if Result <> 0 then exit;
|
||||
Result := Priority - Other.Priority;
|
||||
if Result <> 0 then exit;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := Integer(PtrUint(self) - PtrUInt(Other));
|
||||
{$POP}
|
||||
Result := ComparePointers(Pointer(self), PtrUInt(Other)));
|
||||
end;
|
||||
|
||||
procedure TSynGutterLOvMark.DoChange;
|
||||
@ -463,9 +459,7 @@ function TSynGutterLOvLineMarks.Compare(Other: TSynGutterLOvLineMarks): Integer;
|
||||
begin
|
||||
Result := PixLine - Other.PixLine;
|
||||
if Result <> 0 then exit;
|
||||
{$PUSH}{$Q-} // Overflow is allowed to occur
|
||||
Result := Integer(PtrUint(self) - PtrUInt(Other));
|
||||
{$POP}
|
||||
Result := ComparePointers(Pointer(self), PtrUInt(Other)));
|
||||
end;
|
||||
|
||||
constructor TSynGutterLOvLineMarks.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user