From affd405b37de71fc0fe2408edb8ed37f3bb0b7a4 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 6 May 2014 22:45:18 +0200 Subject: [PATCH] Fixed glm::isinf and glm::isnan for with Android NDK 9d #191, take 2 --- glm/detail/func_common.inl | 16 ++++------------ glm/detail/setup.hpp | 2 -- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 5463e574..4026e0c8 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -716,12 +716,8 @@ namespace detail # if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) return _isnan(x) != 0; # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) -# if(GLM_PLATFORM_ANDROID_VERSION >= 19) - return std::isnan(x); -# else - return _isnan(x) != 0; -# endif +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L) + return _isnan(x) != 0; # else return std::isnan(x); # endif @@ -791,12 +787,8 @@ namespace detail # if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) -# if(GLM_PLATFORM_ANDROID_VERSION >= 19) - return std::isinf(x); -# else - return _isinf(x) != 0; -# endif +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L) + return _isinf(x) != 0; # else return std::isinf(x); # endif diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index cd56a19d..3eb99bc9 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -68,8 +68,6 @@ # define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL #elif defined(__ANDROID__) # define GLM_PLATFORM GLM_PLATFORM_ANDROID -# include -# define GLM_PLATFORM_ANDROID_VERSION __ANDROID_API__ #elif defined(__linux) # define GLM_PLATFORM GLM_PLATFORM_LINUX #elif defined(__unix)