Commit 7f459383 authored by Werner Pamler's avatar Werner Pamler
Browse files

LazControls/SpinEditExBase: Fix compilation issue with FPC 3.2.0. Issue #39491.

parent c3017319
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment