SpinEx: minor optimization in StrToValue;

git-svn-id: trunk@63723 -
This commit is contained in:
bart 2020-08-11 21:19:21 +00:00
parent 292b94d79c
commit 3169d3729b

View File

@ -350,7 +350,6 @@ end;
function TSpinEditExBase.StrToValue(const S: String): T;
var
Def, N: T;
IsNumber: Boolean;
begin
{$ifdef debugspinex}
debugln(['TSpinEditExBase.StrToValue: S="',S,'"']);
@ -363,8 +362,7 @@ begin
nvbInitialValue: Def := FInitialValue;
end;
try
IsNumber := TextIsNumber(S, N);
if IsNumber then
if TextIsNumber(S, N) then
Result := N
else
Result := Def;