From 91785823f6d586538184bd685ec50ea1a59b1eef Mon Sep 17 00:00:00 2001 From: Christophe Date: Wed, 7 Feb 2024 14:33:10 +0100 Subject: [PATCH] Fix warnings --- glm/detail/compute_vector_decl.hpp | 14 +++++++------- test/core/core_force_compiler_unknown.cpp | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/glm/detail/compute_vector_decl.hpp b/glm/detail/compute_vector_decl.hpp index a1b1043aab..00d7de5e1d 100644 --- a/glm/detail/compute_vector_decl.hpp +++ b/glm/detail/compute_vector_decl.hpp @@ -99,7 +99,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a, vec const& b) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] &= static_cast(b[i]); return v; } @@ -111,7 +111,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a, vec const& b) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] |= static_cast(b[i]); return v; } @@ -123,7 +123,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a, vec const& b) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] ^= static_cast(b[i]); return v; } @@ -135,7 +135,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a, vec const& b) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] <<= static_cast(b[i]); return v; } @@ -147,7 +147,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a, vec const& b) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] >>= static_cast(b[i]); return v; } @@ -159,7 +159,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(vec const& v1, vec const& v2) { bool b = true; - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) b = b && detail::compute_equal::is_iec559>::call(v1.x, v2.x); return b; } @@ -180,7 +180,7 @@ namespace glm { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& a) { vec v(a); - for (int i = 0; i < L; ++i) + for (length_t i = 0; i < L; ++i) v[i] = ~v[i]; return v; } diff --git a/test/core/core_force_compiler_unknown.cpp b/test/core/core_force_compiler_unknown.cpp index 33284d09b0..85c96b2660 100644 --- a/test/core/core_force_compiler_unknown.cpp +++ b/test/core/core_force_compiler_unknown.cpp @@ -15,6 +15,7 @@ #elif defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union +# pragma warning(disable: 4324) // structure was padded due to alignment specifier #endif #include