LCL: removed old workaround from TFloatSpinEdit. It worked around a bug which was fixed in FPC 2.4.0. Bug #18674.

git-svn-id: trunk@29397 -
This commit is contained in:
maxim 2011-02-05 17:14:00 +00:00
parent de68945dc9
commit 5492a17fbb

View File

@ -184,23 +184,9 @@ begin
end;
function TCustomFloatSpinEdit.StrToValue(const S: String): Double;
// this is a workaround for the fpc rtl bug in StrToFloatDef function
// which happens when DecimalSeparator = ThousandSeparator
// (look at issue 0013293)
function MyStrToFloatDef(S: String; Def: Double): Double;
var
V: Extended;
begin
if TextToFloat(PChar(S), V) then
Result := V
else
Result := Def;
end;
begin
try
Result := GetLimitedValue(MyStrToFloatDef(S, FValue));
Result := GetLimitedValue(StrToFloatDef(S, FValue));
except
Result := FValue;
end;