Explorar el Código

Fixed Android build

Christophe Riccio hace 14 años
padre
commit
f2454e61f8
Se han modificado 2 ficheros con 13 adiciones y 2 borrados
  1. 11 0
      glm/core/_fixes.hpp
  2. 2 2
      glm/core/func_common.inl

+ 11 - 0
glm/core/_fixes.hpp

@@ -35,3 +35,14 @@
 #ifdef min
 #undef min
 #endif
+
+//! Workaround for Android
+#ifdef isnan
+#undef isnan
+#endif
+
+//! Workaround for Android
+#ifdef isinf
+#undef isinf
+#endif
+

+ 2 - 2
glm/core/func_common.inl

@@ -801,7 +801,7 @@ namespace detail
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 		return typename genType::bool_type(_isnan(x));
 #elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
-		return typename genType::bool_type(isnan(x));
+		return typename genType::bool_type(::isnanf(x));
 #else
 		return typename genType::bool_type(std::isnan(x));
 #endif
@@ -854,7 +854,7 @@ namespace detail
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 		return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF);
 #elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
-		return typename genType::bool_type(isinf(x));
+		return typename genType::bool_type(::__isinf(x));
 #else
 		return typename genType::bool_type(std::isinf(x));
 #endif