summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_p.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-03 01:00:11 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-03 01:00:11 +0200
commit682513bed4401fbc5f8fbaf52752565dbdb0fd03 (patch)
tree130a1eb852a1e596a76608193be86cd08bf3c57d /src/corelib/tools/qlocale_p.h
parentb91e6f6f40864d54903d707d7f19a9732188b670 (diff)
parentf99fe9cee9d35e1fabbf45364631f4a7f049ebe3 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
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 1e8dc28fbf..5edeed1954 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;