Skip to content

Commit

Permalink
test(core): add missing cast
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Jun 20, 2023
1 parent a6ee15b commit b127488
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/tests/reflection/external/glm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void testVec(glm::vec<L, T, Q>, const char* name)
for (glm::length_t i = 0; i < L; ++i)
{
Vec vec{};
to.fields()[i]->template get<T>(&vec) = static_cast<T>(1);
to.fields()[static_cast<std::size_t>(i)]->template get<T>(&vec) = static_cast<T>(1);
CHECK(vec[i] == static_cast<T>(1));
}
}
Expand All @@ -64,8 +64,8 @@ static void testMat(glm::mat<C, R, T, Q>, 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<T>());
CHECK(to.fields()[static_cast<std::size_t>(c * R + r)]->name() == expected);
REQUIRE(to.fields()[static_cast<std::size_t>(c * R + r)]->type().template is<T>());
}
}

Expand All @@ -75,7 +75,7 @@ static void testMat(glm::mat<C, R, T, Q>, const char* name)
for (glm::length_t r = 0; r < R; ++r)
{
Mat mat{};
to.fields()[c * R + r]->template get<T>(&mat) = static_cast<T>(1);
to.fields()[static_cast<std::size_t>(c * R + r)]->template get<T>(&mat) = static_cast<T>(1);
CHECK(mat[c][r] == static_cast<T>(1));
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@ static void testQuat(glm::qua<T, Q>, const char* name)
for (glm::length_t i = 0; i < 4; ++i)
{
Quat qua{};
to.fields()[i]->template get<T>(&qua) = static_cast<T>(1);
to.fields()[static_cast<std::size_t>(i)]->template get<T>(&qua) = static_cast<T>(1);
CHECK(qua[i] == static_cast<T>(1));
}
}
Expand Down

0 comments on commit b127488

Please sign in to comment.