diff --git a/Utilities/BitField.h b/Utilities/BitField.h index 744905d5a2..a433ca907c 100644 --- a/Utilities/BitField.h +++ b/Utilities/BitField.h @@ -36,7 +36,7 @@ struct bf_t : bf_base // Get bitmask of size N, at I pos static constexpr utype data_mask() { - return static_cast(~utype{} >> (bf_t::bitmax - bf_t::bitsize) << bitpos); + return static_cast(static_cast(~utype{} >> (bf_t::bitmax - bf_t::bitsize)) << bitpos); } // Bitfield extraction helper