diff --git a/core/tests/reflection/external/glm.cpp b/core/tests/reflection/external/glm.cpp index 737e88af95..ecd7ccb345 100644 --- a/core/tests/reflection/external/glm.cpp +++ b/core/tests/reflection/external/glm.cpp @@ -44,7 +44,7 @@ static void testVec(glm::vec, const char* name) for (glm::length_t i = 0; i < L; ++i) { Vec vec{}; - to.fields()[i]->template get(&vec) = static_cast(1); + to.fields()[static_cast(i)]->template get(&vec) = static_cast(1); CHECK(vec[i] == static_cast(1)); } } @@ -64,8 +64,8 @@ static void testMat(glm::mat, const char* name) for (glm::length_t r = 0; r < R; ++r) { std::string expected = std::to_string(c) + std::to_string(r); - CHECK(to.fields()[c * R + r]->name() == expected); - REQUIRE(to.fields()[c * R + r]->type().template is()); + CHECK(to.fields()[static_cast(c * R + r)]->name() == expected); + REQUIRE(to.fields()[static_cast(c * R + r)]->type().template is()); } } @@ -75,7 +75,7 @@ static void testMat(glm::mat, const char* name) for (glm::length_t r = 0; r < R; ++r) { Mat mat{}; - to.fields()[c * R + r]->template get(&mat) = static_cast(1); + to.fields()[static_cast(c * R + r)]->template get(&mat) = static_cast(1); CHECK(mat[c][r] == static_cast(1)); } } @@ -106,7 +106,7 @@ static void testQuat(glm::qua, const char* name) for (glm::length_t i = 0; i < 4; ++i) { Quat qua{}; - to.fields()[i]->template get(&qua) = static_cast(1); + to.fields()[static_cast(i)]->template get(&qua) = static_cast(1); CHECK(qua[i] == static_cast(1)); } }