diff --git a/core/tests/reflection/external/glm.cpp b/core/tests/reflection/external/glm.cpp index 865101e3f..51d06e163 100644 --- a/core/tests/reflection/external/glm.cpp +++ b/core/tests/reflection/external/glm.cpp @@ -26,12 +26,12 @@ static void testMat(const char* name, glm::mat mat, glm::vec= 3) + if constexpr (C >= 3) { CHECK(&*++(++fields.begin()) == fields.field("c")); } - if (C >= 4) + if constexpr (C >= 4) { CHECK(&*++(++(++fields.begin())) == fields.field("d")); } @@ -71,12 +71,12 @@ static void testVec(const char* name, glm::vec vec) CHECK(&*fields.begin() == fields.field("x")); CHECK(&*++fields.begin() == fields.field("y")); - if (L >= 3) + if constexpr (L >= 3) { CHECK(&*++(++fields.begin()) == fields.field("z")); } - if (L >= 4) + if constexpr (L >= 4) { CHECK(&*++(++(++fields.begin())) == fields.field("w")); }