mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 17:00:04 +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;
|
function TSpinEditExBase.StrToValue(const S: String): T;
|
||||||
var
|
var
|
||||||
Def, N: T;
|
Def, N: T;
|
||||||
IsNumber: Boolean;
|
|
||||||
begin
|
begin
|
||||||
{$ifdef debugspinex}
|
{$ifdef debugspinex}
|
||||||
debugln(['TSpinEditExBase.StrToValue: S="',S,'"']);
|
debugln(['TSpinEditExBase.StrToValue: S="',S,'"']);
|
||||||
@ -363,8 +362,7 @@ begin
|
|||||||
nvbInitialValue: Def := FInitialValue;
|
nvbInitialValue: Def := FInitialValue;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
IsNumber := TextIsNumber(S, N);
|
if TextIsNumber(S, N) then
|
||||||
if IsNumber then
|
|
||||||
Result := N
|
Result := N
|
||||||
else
|
else
|
||||||
Result := Def;
|
Result := Def;
|
||||||
|
Loading…
Reference in New Issue
Block a user