浏览代码

Fixed /W4 warnings

Christophe Riccio 14 年之前
父节点
当前提交
5431212c55
共有 5 个文件被更改,包括 21 次插入20 次删除
  1. 1 1
      glm/core/func_packing.inl
  2. 12 10
      glm/core/intrinsic_common.inl
  3. 3 4
      glm/gtc/half_float.inl
  4. 2 2
      glm/gtx/ulp.inl
  5. 3 3
      test/core/core_type_half.cpp

+ 1 - 1
glm/core/func_packing.inl

@@ -128,7 +128,7 @@ GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v)
 	return *(detail::tvec2<uint>*)&v;
 }
 
-GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)
+GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v)
 {
 	detail::tvec2<detail::hdata> Pack(detail::toFloat16(v.x), detail::toFloat16(v.y));
 	return *(uint*)&Pack;

+ 12 - 10
glm/core/intrinsic_common.inl

@@ -205,11 +205,13 @@ GLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)
 }
 
 /// TODO
+/*
 GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
 {
 	__m128 empty;
     return empty;
 }
+*/
 
 //GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
 
@@ -254,18 +256,18 @@ GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
 }
 
 /// \todo
-GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
-{
-	__m128 empty;
-    return empty;
-}
+//GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
+//{
+//	__m128 empty;
+//    return empty;
+//}
 
 /// \todo
-GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
-{
-	__m128 empty;
-    return empty;
-}
+//GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
+//{
+//	__m128 empty;
+//    return empty;
+//}
 
 // SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
 // By Elan Ruskin, http://assemblyrequired.crashworks.org/

+ 3 - 4
glm/gtc/half_float.inl

@@ -20,7 +20,7 @@ GLM_FUNC_QUALIFIER tvec2<thalf>::size_type tvec2<thalf>::value_size()
 	return 2;
 }
 
-GLM_FUNC_QUALIFIER typename tvec2<thalf>::size_type tvec2<thalf>::length() const
+GLM_FUNC_QUALIFIER tvec2<thalf>::size_type tvec2<thalf>::length() const
 {
 	return 2;
 }
@@ -293,7 +293,7 @@ GLM_FUNC_QUALIFIER tvec3<thalf>::size_type tvec3<thalf>::value_size()
 	return 3;
 }
 
-GLM_FUNC_QUALIFIER typename tvec3<thalf>::size_type tvec3<thalf>::length() const
+GLM_FUNC_QUALIFIER tvec3<thalf>::size_type tvec3<thalf>::length() const
 {
 	return 3;
 }
@@ -610,8 +610,7 @@ GLM_FUNC_QUALIFIER tvec4<thalf>::size_type tvec4<thalf>::value_size()
 	return 4;
 }
 
-	
-GLM_FUNC_QUALIFIER typename tvec4<thalf>::size_type tvec4<thalf>::length() const
+GLM_FUNC_QUALIFIER tvec4<thalf>::size_type tvec4<thalf>::length() const
 {
 	return 4;
 }

+ 2 - 2
glm/gtx/ulp.inl

@@ -76,8 +76,8 @@ namespace detail
 		volatile float t;
 		glm::detail::int32 hx, hy, ix, iy;
 
-		GLM_GET_FLOAT_WORD(hx,x);
-		GLM_GET_FLOAT_WORD(hy,y);
+		GLM_GET_FLOAT_WORD(hx, x);
+		GLM_GET_FLOAT_WORD(hy, y);
 		ix = hx&0x7fffffff;             // |x|
 		iy = hy&0x7fffffff;             // |y|
 

+ 3 - 3
test/core/core_type_half.cpp

@@ -18,13 +18,13 @@ int main()
 	glm::half B(2.0f);
 	glm::half C = A + B;
 	glm::half D(C);
-	float E = D;
-	int F = float(C);
+	float E(D);
+	int F(float(C));
 	glm::half G = B * C;
 	glm::half H = G / C;
 	H += glm::half(1.0f);
 	double J = H;
-	int I = float(H);
+	int I(float(H));
 
 	Result = Result && J == 3.0;