Commit 182cc8b8 authored by Werner Pamler's avatar Werner Pamler
Browse files

LazControls/SpinEditExBase: Add virtual method SameValue() to fix compilation...

LazControls/SpinEditExBase: Add virtual method SameValue() to fix compilation issue on Win/x64 for a currency descendant. Issue #39490.
parent 89162e9c
......@@ -237,6 +237,13 @@ 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;
......
......@@ -141,6 +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;
procedure SetValue(const AValue: T); virtual;
procedure SetNullValue(AValue: T); virtual;
procedure SetMaxValue(const AValue: T); virtual;
......
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