summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qnumeric_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index 8414a681fc7..47edc9573f9 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -384,7 +384,7 @@ convertDoubleTo(double v, T *value, bool allow_precision_upgrade = true)
// Check for in-range value to ensure the conversion is not UB (see the
// comment above for Standard language).
- if (std::fabs(v) > (std::numeric_limits<T>::max)()) {
+ if (std::fabs(v) > double{(std::numeric_limits<T>::max)()}) {
*value = v < 0 ? -Huge : Huge;
return false;
}