summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qlocale_p.h')
-rw-r--r--src/corelib/tools/qlocale_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 98b6a31a46..70430beb00 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -254,10 +254,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;