aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-20 09:49:32 +0200
committerRalf Nolden <nolden@kde.org>2016-05-20 10:20:49 +0000
commit106054d3f5e002d46e18a8c01bc660af8959a71c (patch)
tree3840ac80f9a0f795e66149fe61d8b3cdd0ea740e
parent541eb6b704b53a6e889ea206d8e058ec3017100c (diff)
Always use ::copysign instead of std::copysign where available
Change to remove the Q_OS_ANDROID define for using ::copysign there instead of std::copysign as other systems are affected as well (FreeBSD 9.3 with gcc 4.8 in particular). The distinction does cause more problems than simply using ::copysign everywhere. Change-Id: I1fe42fdee9c1c1bbb3e5930573ff29c600dfb5e0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
-rw-r--r--src/qml/jsruntime/qv4mathobject.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp
index 50b81098b2..cb17583b98 100644
--- a/src/qml/jsruntime/qv4mathobject.cpp
+++ b/src/qml/jsruntime/qv4mathobject.cpp
@@ -85,18 +85,10 @@ Heap::MathObject::MathObject()
m->defineDefaultProperty(QStringLiteral("tan"), QV4::MathObject::method_tan, 1);
}
-#ifdef Q_OS_ANDROID
-// C++11's std::copysign is missing in the std namespace, so get it from the root namespace (math.h)
static Q_ALWAYS_INLINE double copySign(double x, double y)
{
return ::copysign(x, y);
}
-#else // Ok, we have a proper C++11 standard library
-static Q_ALWAYS_INLINE double copySign(double x, double y)
-{
- return std::copysign(x, y);
-}
-#endif
ReturnedValue MathObject::method_abs(CallContext *context)
{