From 98ca36e8f585cc54acd3396be7d13e0a7ade2892 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Wed, 26 Sep 2012 08:36:56 +0200 Subject: [PATCH] MSVC has no std::isnan --- simgear/math/SGGeod.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/simgear/math/SGGeod.hxx b/simgear/math/SGGeod.hxx index 54b2f37f..2ab2b107 100644 --- a/simgear/math/SGGeod.hxx +++ b/simgear/math/SGGeod.hxx @@ -20,6 +20,10 @@ #include +#ifndef _MSC_VER +using std::isnan; +#endif + // #define SG_GEOD_NATIVE_DEGREE /// Class representing a geodetic location @@ -352,7 +356,7 @@ inline bool SGGeod::isValid() const { - if (std::isnan(_lon) || std::isnan(_lat)) return false; + if (isnan(_lon) || isnan(_lat)) return false; #ifdef SG_GEOD_NATIVE_DEGREE return (_lon >= -180.0) && (_lon <= 180.0) && (_lat >= -90.0) && (_lat <= 90.0);