Browse Source

Fixed Visual C++ /W4 warnings

Christophe Riccio 8 years ago
parent
commit
d0ed6aef21
1 changed files with 4 additions and 4 deletions
  1. 4 4
      test/gtc/gtc_bitfield.cpp

+ 4 - 4
test/gtc/gtc_bitfield.cpp

@@ -606,11 +606,11 @@ namespace bitfieldInterleave
 		{
 			// SIMD
 			std::vector<__m128i> SimdData;
-			SimdData.resize(x_max * y_max);
+			SimdData.resize(static_cast<std::size_t>(x_max * y_max));
 			std::vector<__m128i> SimdParam;
-			SimdParam.resize(x_max * y_max);
-			for(int i = 0; i < SimdParam.size(); ++i)
-				SimdParam[i] = _mm_set_epi32(i % x_max, 0, i / y_max, 0);
+			SimdParam.resize(static_cast<std::size_t>(x_max * y_max));
+			for(std::size_t i = 0; i < SimdParam.size(); ++i)
+				SimdParam[i] = _mm_set_epi32(static_cast<int>(i % static_cast<std::size_t>(x_max)), 0, static_cast<int>(i / static_cast<std::size_t>(y_max)), 0);
 
 			std::clock_t LastTime = std::clock();