diff options
Diffstat (limited to 'src/corelib/tools/qlocale_p.h')
-rw-r--r-- | src/corelib/tools/qlocale_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index a96ecf1c1c..7487c9128c 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -252,10 +252,8 @@ public: const float huge = std::numeric_limits<float>::infinity(); return d < 0 ? -huge : huge; } - if (std::fabs(d) >= std::numeric_limits<double>::min() // i.e. d != 0 - && std::fabs(d) < std::numeric_limits<float>::min()) { - // Values smaller than std::numeric_limits<double>::min() have - // failed already; match them. + if (d != 0 && float(d) == 0) { + // Values that underflow double already failed. Match them: if (ok != 0) *ok = false; return 0; |