aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/common/qjsnumbercoercion.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/common/qjsnumbercoercion.h b/src/qml/common/qjsnumbercoercion.h
index bc04794d2f..53d587676d 100644
--- a/src/qml/common/qjsnumbercoercion.h
+++ b/src/qml/common/qjsnumbercoercion.h
@@ -20,8 +20,8 @@ public:
{
// Comparing d with itself checks for NaN and comparing d with the min and max values
// for int also covers infinities.
- if (!equals(d, d) || d < std::numeric_limits<int>::min()
- || d > std::numeric_limits<int>::max()) {
+ if (!equals(d, d) || d < (std::numeric_limits<int>::min)()
+ || d > (std::numeric_limits<int>::max)()) {
return false;
}
@@ -32,7 +32,7 @@ public:
static constexpr bool isArrayIndex(double d)
{
- if (d < 0 || !equals(d, d) || d > std::numeric_limits<int>::max()) {
+ if (d < 0 || !equals(d, d) || d > (std::numeric_limits<int>::max)()) {
return false;
}
@@ -44,7 +44,7 @@ public:
if (!equals(d, d))
return 0;
- if (d >= std::numeric_limits<int>::min() && d <= std::numeric_limits<int>::max()) {
+ if (d >= (std::numeric_limits<int>::min)() && d <= (std::numeric_limits<int>::max)()) {
const int i = static_cast<int>(d);
if (equals(i, d))
return i;