diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index 273f27184..ad5be89c8 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -76,7 +76,7 @@ inline bool isfinite(double d) { return _finite(d); } } // namespace std -inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } +//inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } #endif // Do certain things depending on whether the JIT is enabled or disabled diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 9802579cd..4d447b530 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -47,7 +47,7 @@ #include #include -#include +//#include #include using namespace QV4; diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 6ebbe5a45..d479ce709 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)