LazControls/SpinEditExBase: Add virtual method SameValue() to fix compilation issue on Win/x64 for a currency descendant. Issue #39490.

This commit is contained in:
wp_xyz 2021-11-27 00:30:47 +01:00
parent 89162e9c1c
commit 182cc8b8e6
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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;