summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-01 23:00:46 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2019-04-01 23:08:25 +0000
commit2f8dcdf93cb2a6156d461679d8eecd9cc4a152f8 (patch)
tree76ca84bce8d6204c28b056b0c7388f94f3888e2e /src/corelib
parent81ed119da1215c9dda5ff202cc1339eadb62bda4 (diff)
parentffe9c395dc5a8a3f1dfdd820557d0eadeca24f22 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13
Diffstat (limited to 'src/corelib')
-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;