mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 14:59:28 +02:00
SpinEx: minor optimization in StrToValue;
git-svn-id: trunk@63723 -
This commit is contained in:
parent
292b94d79c
commit
3169d3729b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user