aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-12-10 09:36:42 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-12-15 11:43:36 +0000
commit2b9dda3e4c6aeb294f38e827c0d98ac63d2863b3 (patch)
tree115458ce4eb12c715cc10b94d6196b36ea112297 /src/qml/jsruntime/qv4stringobject.cpp
parent6baf4797e8d0bfd8af3df923042c5793ce44f212 (diff)
QV4 Engine: Remove MSVC special casing
This patch removes a workaround for old versions of MSVC; we should be able to rely on the standard library nowadays. Original-patch-by: Alexander Neumann Fixes: QTBUG-89203 Change-Id: I8047565000fc7e4e3b8ac28584ff4a479b648274 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit fb4de27768935393744cbd67e9789d325e70e742)
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index e41c1030b3..14c1e3ed54 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -531,9 +531,9 @@ ReturnedValue StringPrototype::method_lastIndexOf(const FunctionObject *b, const
if (std::isnan(position))
position = +qInf();
else
- position = trunc(position);
+ position = std::trunc(position);
- int pos = trunc(qMin(qMax(position, 0.0), double(value.length())));
+ int pos = std::trunc(qMin(qMax(position, 0.0), double(value.length())));
if (!searchString.isEmpty() && pos == value.length())
--pos;
if (searchString.isNull() && pos == 0)