From a6d4db8910b14194fbb764ea95efb881c0005d74 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Wed, 17 Aug 2016 10:00:46 +0200 Subject: [PATCH] Crosscompiling solution for isfinite & isnan --- modules/acore/framework/Common.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/acore/framework/Common.h b/modules/acore/framework/Common.h index b8e97695e..632b3d085 100644 --- a/modules/acore/framework/Common.h +++ b/modules/acore/framework/Common.h @@ -137,13 +137,11 @@ #endif +using namespace std; + inline float finiteAlways(float f) { return isfinite(f) ? f : 0.0f; } -#if COMPILER == COMPILER_MICROSOFT -inline bool myisfinite(float f) { return _finite(f) && !_isnan(f); } -#else -inline bool myisfinite(float f) { return isfinite(f) && !std::isnan(f); } -#endif +inline bool myisfinite(float f) { return isfinite(f) && !isnan(f); } #define atol(a) strtoul( a, NULL, 10)