mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-10 17:22:42 +02:00
LazControls/SpinEditExBase: Fix compilation issue with FPC 3.2.0. Issue #39491.
This commit is contained in:
parent
c301731931
commit
7f45938388
@ -237,13 +237,6 @@ begin
|
||||
SpinUpDown(False);
|
||||
end;
|
||||
|
||||
{ This is added as a virtual method because the 64-bit compiler on Windows cannot
|
||||
determine which overloaded function to call when T is Currency. }
|
||||
function TSpinEditExBase.SameValue(AValue1, AValue2: T): Boolean;
|
||||
begin
|
||||
Result := Math.SameValue(AValue1, AValue2);
|
||||
end;
|
||||
|
||||
procedure TSpinEditExBase.SetValue(const AValue: T);
|
||||
var
|
||||
ValueFromText: T;
|
||||
@ -531,6 +524,11 @@ begin
|
||||
Result := AValue - FIncrement;
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEditEx.SameValue(AValue1, AValue2: Double): Boolean;
|
||||
begin
|
||||
Result := Math.SameValue(AValue1, AValue2);
|
||||
end;
|
||||
|
||||
procedure TCustomFloatSpinEditEx.SetDecimals(ADecimals: Integer);
|
||||
begin
|
||||
if (FDecimals = ADecimals) or (ADecimals < 0) then Exit;
|
||||
@ -664,6 +662,11 @@ begin
|
||||
Result := AValue - FIncrement;
|
||||
end;
|
||||
|
||||
function TCustomSpinEditEx.SameValue(AValue1, AValue2: Int64): Boolean;
|
||||
begin
|
||||
Result := (AValue1 = AValue2);
|
||||
end;
|
||||
|
||||
function TCustomSpinEditEx.TextIsNumber(const S: String; out ANumber: Int64
|
||||
): Boolean;
|
||||
var
|
||||
|
@ -141,7 +141,7 @@ type
|
||||
procedure EditMouseWheelDown(Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); override;
|
||||
function SafeInc(AValue: T): T; virtual; abstract;
|
||||
function SafeDec(AValue: T): T; virtual abstract;
|
||||
function SameValue(AValue1, AValue2: T): boolean; virtual;
|
||||
function SameValue(AValue1, AValue2: T): boolean; virtual; abstract;
|
||||
procedure SetValue(const AValue: T); virtual;
|
||||
procedure SetNullValue(AValue: T); virtual;
|
||||
procedure SetMaxValue(const AValue: T); virtual;
|
||||
@ -209,6 +209,7 @@ type
|
||||
function TextIsNumber(const S: String; out ANumber: Double): Boolean; override;
|
||||
function SafeInc(AValue: Double): Double; override;
|
||||
function SafeDec(AValue: Double): Double; override;
|
||||
function SameValue(AValue1, AValue2: Double): Boolean; override;
|
||||
procedure SetDecimals(ADecimals: Integer); virtual;
|
||||
public
|
||||
function ValueToStr(const AValue: Double): String; override;
|
||||
@ -320,6 +321,7 @@ type
|
||||
protected
|
||||
function SafeInc(AValue: Int64): Int64; override;
|
||||
function SafeDec(AValue: Int64): Int64; override;
|
||||
function SameValue(AValue1, AValue2: Int64): Boolean; override;
|
||||
function TextIsNumber(const S: String; out ANumber: Int64): Boolean; override;
|
||||
public
|
||||
function ValueToStr(const AValue: Int64): String; override;
|
||||
|
Loading…
Reference in New Issue
Block a user