Browse Source

Corrected test for msvc compiler

Aaron 9 years ago
parent
commit
460b6ba1b6
2 changed files with 5 additions and 4 deletions
  1. 2 2
      glm/detail/func_integer.inl
  2. 3 2
      glm/detail/type_vec.hpp

+ 2 - 2
glm/detail/func_integer.inl

@@ -317,7 +317,7 @@ namespace detail
 	template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
 	GLM_FUNC_QUALIFIER vecType<int, P> bitCount(vecType<T, P> const & v)
 	{
-	#ifdef GLM_COMPILER_VC
+	#if GLM_COMPILER & GLM_COMPILER_VC
 	#pragma warning(push)
 	#pragma warning(disable : 4310) //cast truncates constant value
 	#endif
@@ -329,7 +329,7 @@ namespace detail
 		x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 32>::call(x, typename detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename detail::make_unsigned<T>::type(16));
 		x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 64>::call(x, typename detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename detail::make_unsigned<T>::type(32));
 		return vecType<int, P>(x);
-	#ifdef GLM_COMPILER_VC
+	#if GLM_COMPILER & GLM_COMPILER_VC
 	#pragma warning(pop)
 	#endif
 	}

+ 3 - 2
glm/detail/type_vec.hpp

@@ -9,7 +9,7 @@
 namespace glm{
 namespace detail
 {
-#ifdef GLM_COMPILER_VC
+#if GLM_COMPILER & GLM_COMPILER_VC
 #pragma warning(push)
 #pragma warning(disable : 4324) // structure was padded due to alignment specifier
 #endif
@@ -21,9 +21,10 @@ namespace detail
 	template<> GLM_ALIGNED_STRUCT(16) aligned<16>{};
 	template<> GLM_ALIGNED_STRUCT(32) aligned<32>{};
 	template<> GLM_ALIGNED_STRUCT(64) aligned<64>{};
-#ifdef GLM_COMPILER_VC
+#if GLM_COMPILER & GLM_COMPILER_VC
 #pragma warning(pop)
 #endif
+
 	template <typename T, std::size_t size, bool aligned>
 	struct storage
 	{