From 64861133792e2b22bcbeed4a70a4550bef17e9ef Mon Sep 17 00:00:00 2001 From: Gergely Racz Date: Fri, 12 May 2023 11:09:41 +0200 Subject: [PATCH] apply static_cast before calling `mask` in `bitfieldInsert` --- glm/detail/func_integer.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 091e1e0c..a28c743e 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -270,7 +270,7 @@ namespace detail { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); - T const Mask = static_cast(detail::mask(Bits) << Offset); + T const Mask = detail::mask(static_cast(Bits)) << Offset; return (Base & ~Mask) | ((Insert << static_cast(Offset)) & Mask); }