Browse Source

Fixed build errors with GCC and Clang #664 and #666

Christophe Riccio 8 years ago
parent
commit
22c88fd821
3 changed files with 3 additions and 17 deletions
  1. 1 1
      glm/detail/setup.hpp
  2. 0 14
      glm/detail/type_vec4_simd.inl
  3. 2 2
      glm/gtx/quaternion.inl

+ 1 - 1
glm/detail/setup.hpp

@@ -698,7 +698,7 @@
 
 #if GLM_HAS_CONSTEXPR || GLM_HAS_CONSTEXPR_PARTIAL
 #	define GLM_CONSTEXPR constexpr
-#	if GLM_COMPILER & GLM_COMPILER_VC // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
+#	if ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC14)) // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
 #		define GLM_CONSTEXPR_CTOR
 #	else
 #		define GLM_CONSTEXPR_CTOR constexpr

+ 0 - 14
glm/detail/type_vec4_simd.inl

@@ -339,20 +339,6 @@ namespace detail
 	};
 }//namespace detail
 
-#	if !GLM_HAS_DEFAULTED_FUNCTIONS
-		template<>
-		GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec()
-		{}
-
-		template<>
-		GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec()
-		{}
-
-		template<>
-		GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec()
-		{}
-#	endif//!GLM_HAS_DEFAULTED_FUNCTIONS
-
 	template<>
 	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float _s) :
 		data(_mm_set1_ps(_s))

+ 2 - 2
glm/gtx/quaternion.inl

@@ -228,7 +228,7 @@ namespace glm
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtRH(vec<3, T, P> const& direction, vec<3, T, P> const& up)
 	{
-		tmat3x3<T, P> Result;
+		mat<3, 3, T, P> Result;
 
 		Result[2] = -normalize(direction);
 		Result[0] = normalize(cross(up, Result[2]));
@@ -240,7 +240,7 @@ namespace glm
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtLH(vec<3, T, P> const& direction, vec<3, T, P> const& up)
 	{
-		tmat3x3<T, P> Result;
+		mat<3, 3, T, P> Result;
 
 		Result[2] = normalize(direction);
 		Result[0] = normalize(cross(up, Result[2]));