From: Frederic Bouvier Date: Wed, 26 Sep 2012 06:36:56 +0000 (+0200) Subject: MSVC has no std::isnan X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=98ca36e8f585cc54acd3396be7d13e0a7ade2892;p=simgear.git MSVC has no std::isnan --- 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);