From d0ed6aef218670b8be309f2d3488a3c7a3bce4ee Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 18 Aug 2017 18:41:04 +0200 Subject: [PATCH] Fixed Visual C++ /W4 warnings --- test/gtc/gtc_bitfield.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/gtc/gtc_bitfield.cpp b/test/gtc/gtc_bitfield.cpp index a3c113df..93a0e385 100644 --- a/test/gtc/gtc_bitfield.cpp +++ b/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(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(x_max * y_max)); + for(std::size_t i = 0; i < SimdParam.size(); ++i) + SimdParam[i] = _mm_set_epi32(static_cast(i % static_cast(x_max)), 0, static_cast(i / static_cast(y_max)), 0); std::clock_t LastTime = std::clock();