Browse Source

Fixed link errors on compilers not supported default function #377

Christophe Riccio 10 years ago
parent
commit
debed28149
3 changed files with 6 additions and 3 deletions
  1. 2 2
      glm/detail/setup.hpp
  2. 3 0
      readme.md
  3. 1 1
      test/gtx/gtx_common.cpp

+ 2 - 2
glm/detail/setup.hpp

@@ -617,10 +617,10 @@
 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
 #	define GLM_HAS_DEFAULTED_FUNCTIONS 1
 #else
-#	define GLM_HAS_DEFAULTED_FUNCTIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+#	define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
 		((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
 		((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
-		((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)))
+		((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12))))
 #endif
 
 // N2118

+ 3 - 0
readme.md

@@ -54,6 +54,9 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 ##### Features:
 - Added GLM_SIMD to enable automatic SIMD code generation for generic GLM types #235 #370
 
+##### Fixes:
+- Fixed link errors on compilers not supported default function #377
+
 #### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02
 ##### Features:
 - Added GTC_color_space: convertLinearToSRGB and convertSRGBToLinear functions

+ 1 - 1
test/gtx/gtx_common.cpp

@@ -40,7 +40,7 @@ namespace fmod_
 	template <typename genType>
 	GLM_FUNC_QUALIFIER genType modTrunc(genType a, genType b)
 	{
-		return a - b * trunc(a / b);
+		return a - b * glm::trunc(a / b);
 	}
 
 	int test()