From 07d19a308487fc475791c7ed0a9a54e638828fc5 Mon Sep 17 00:00:00 2001 From: Nicholas Frechette Date: Thu, 21 Sep 2023 21:29:31 -0400 Subject: [PATCH] fix(mask): avoid signed/unsigned warning --- includes/rtm/impl/mask_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/rtm/impl/mask_common.h b/includes/rtm/impl/mask_common.h index 99039130..d39b6854 100644 --- a/includes/rtm/impl/mask_common.h +++ b/includes/rtm/impl/mask_common.h @@ -210,7 +210,7 @@ namespace rtm const uint32_t z_mask = z ? 0xFFFFFFFFU : 0; const uint32_t w_mask = w ? 0xFFFFFFFFU : 0; - return mask4d{ _mm_castsi128_pd(_mm_set_epi32(y_mask, y_mask, x_mask, x_mask)), _mm_castsi128_pd(_mm_set_epi32(w_mask, w_mask, z_mask, z_mask)) }; + return mask4d{ _mm_castsi128_pd(_mm_set_epi32(static_cast(y_mask), static_cast(y_mask), static_cast(x_mask), static_cast(x_mask))), _mm_castsi128_pd(_mm_set_epi32(static_cast(w_mask), static_cast(w_mask), static_cast(z_mask), static_cast(z_mask))) }; #else return mask4d{ _mm_castsi128_pd(_mm_set_epi64x(static_cast(y), static_cast(x))), _mm_castsi128_pd(_mm_set_epi64x(static_cast(w), static_cast(z))) }; #endif @@ -235,7 +235,7 @@ namespace rtm const uint32_t z_mask = z ? 0xFFFFFFFFU : 0; const uint32_t w_mask = w ? 0xFFFFFFFFU : 0; - return mask4q{ _mm_set_epi32(y_mask, y_mask, x_mask, x_mask), _mm_set_epi32(w_mask, w_mask, z_mask, z_mask) }; + return mask4q{ _mm_set_epi32(static_cast(y_mask), static_cast(y_mask), static_cast(x_mask), static_cast(x_mask)), _mm_set_epi32(static_cast(w_mask), static_cast(w_mask), static_cast(z_mask), static_cast(z_mask)) }; #else return mask4q{ _mm_set_epi64x(static_cast(y), static_cast(x)), _mm_set_epi64x(static_cast(w), static_cast(z)) }; #endif