diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/jsruntime/qv4global_p.h | 15 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4mathobject.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 4 |
3 files changed, 2 insertions, 18 deletions
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index ace070c683..77f8fe75d0 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -64,21 +64,6 @@ #include <qtqmlglobal.h> #include <private/qtqmlglobal_p.h> -#if defined(Q_CC_MSVC) -#include <float.h> -#include <math.h> - -namespace std { - -inline bool isinf(double d) { return !_finite(d) && !_isnan(d); } -inline bool isnan(double d) { return !!_isnan(d); } -inline bool isfinite(double d) { return _finite(d); } - -} // namespace std - -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 #if QT_CONFIG(qml_jit) diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 07440047d4..c6b74e7aba 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -47,7 +47,6 @@ #include <QtCore/private/qnumeric_p.h> #include <QtCore/qthreadstorage.h> -#include <math.h> #include <cmath> using namespace QV4; 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) |