diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-11 10:06:44 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-01-15 08:40:14 +0100 |
commit | 63ca2846e19df60e3eff1a451ef6fa459aa1bbdd (patch) | |
tree | 3da6bb3a4722587ef4dd39f641bd809128ca9acc /tests | |
parent | c3590c76775c889fde13dc155c2a31508db612e9 (diff) | |
download | qtbase-63ca2846e19df60e3eff1a451ef6fa459aa1bbdd.tar.gz qtbase-63ca2846e19df60e3eff1a451ef6fa459aa1bbdd.tar.bz2 qtbase-63ca2846e19df60e3eff1a451ef6fa459aa1bbdd.zip |
Fix compilation with older MSVC: use qIsNan instead of isnan
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.
Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/dbus/qdbusmarshall/common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h index 76fe0e4bfb..323b54a137 100644 --- a/tests/auto/dbus/qdbusmarshall/common.h +++ b/tests/auto/dbus/qdbusmarshall/common.h @@ -30,7 +30,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include <math.h> // isnan +#include <qmath.h> // qIsNan #include <qvariant.h> #ifdef Q_OS_UNIX @@ -320,7 +320,7 @@ bool compare(const QVariant &v1, const QVariant &v2); bool compare(double d1, double d2) { - if (isnan(d1) && isnan(d2)) + if (qIsNaN(d1) && qIsNaN(d2)) return true; return d1 == d2; } |