diff options
author | Fabian Kosmale <[email protected]> | 2020-12-10 09:36:42 +0100 |
---|---|---|
committer | Tarja Sundqvist <[email protected]> | 2021-02-10 14:54:30 +0200 |
commit | 351695310dbc2b78fb924d2637dd8980106a4482 (patch) | |
tree | fc8ca9c684a8e803996f06650340f024d7ef92a7 /src/qml/jsruntime/qv4stringobject.cpp | |
parent | 1f5616fb2bb8b199c5c238e1e1030a9ec9f875c8 (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 <[email protected]>
(cherry picked from commit fb4de27768935393744cbd67e9789d325e70e742)
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 3fc1f881b6..c2b32f9010 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -533,9 +533,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) |