Browse Source

Fixed /W4 VC warnings

Christophe Riccio 14 years ago
parent
commit
ac8552d296
2 changed files with 10 additions and 0 deletions
  1. 5 0
      glm/core/intrinsic_common.inl
  2. 5 0
      glm/gtx/ulp.inl

+ 5 - 0
glm/core/intrinsic_common.inl

@@ -10,6 +10,9 @@
 namespace glm{
 namespace glm{
 namespace detail{
 namespace detail{
 
 
+#pragma warning(push)
+#pragma warning(disable : 4510 4512 4610)
+
 	union ieee754_QNAN
 	union ieee754_QNAN
 	{
 	{
 	   const float f;
 	   const float f;
@@ -21,6 +24,8 @@ namespace detail{
 	   ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
 	   ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
 	};
 	};
 
 
+#pragma warning(pop)
+
 	static const __m128 GLM_VAR_USED zero = _mm_setzero_ps();
 	static const __m128 GLM_VAR_USED zero = _mm_setzero_ps();
 	static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);
 	static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);
 	static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);
 	static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);

+ 5 - 0
glm/gtx/ulp.inl

@@ -21,6 +21,9 @@
  * ====================================================
  * ====================================================
  */
  */
 
 
+#pragma warning(push)
+#pragma warning(disable : 4127)
+
 typedef union
 typedef union
 {
 {
 	float value;
 	float value;
@@ -168,6 +171,8 @@ namespace detail
 }//namespace detail
 }//namespace detail
 }//namespace glm
 }//namespace glm
 
 
+#pragma warning(pop)
+
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 #	define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))
 #	define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))
 #   define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward))
 #   define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward))