mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
do not handle NAN and INFINITY explicitly in QLocalePrivate::bytearrayToDouble()
std::strtod() should support such cases, even case-insensitive occurences Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5717bc5056
commit
36e1687e0e
1 changed files with 0 additions and 9 deletions
|
@ -2731,15 +2731,6 @@ double QLocalePrivate::bytearrayToDouble(const char *num, bool *ok, bool *overfl
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
if (qstrcmp(num, "nan") == 0)
|
||||
return qSNaN();
|
||||
|
||||
if (qstrcmp(num, "+inf") == 0 || qstrcmp(num, "inf") == 0)
|
||||
return qInf();
|
||||
|
||||
if (qstrcmp(num, "-inf") == 0)
|
||||
return -qInf();
|
||||
|
||||
char *endptr;
|
||||
double ret = std::strtod(num, &endptr);
|
||||
if ((ret == 0.0l && errno == ERANGE) || ret == HUGE_VAL || ret == -HUGE_VAL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue