From fe2d2583e4320f224a8dabda01e71b4fa7a07226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Fonseca?= Date: Thu, 28 Sep 2023 18:25:17 +0100 Subject: [PATCH] fix(core): use if constexpr when possible --- core/tests/reflection/external/glm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tests/reflection/external/glm.cpp b/core/tests/reflection/external/glm.cpp index 865101e3fb..51d06e1630 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")); }