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>
This commit is contained in:
Thiago Macieira 2015-01-11 10:06:44 -08:00
parent c3590c7677
commit 63ca2846e1

View File

@ -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;
}