mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-27 06:21:02 +00:00
bf_t: fix warning
This commit is contained in:
parent
fd1ca2f102
commit
9fccb47e7c
@ -18,6 +18,9 @@ struct bf_base
|
||||
// Value mask
|
||||
static constexpr utype vmask = static_cast<utype>(~utype{} >> (bitmax - bitsize));
|
||||
|
||||
// All ones mask
|
||||
static constexpr utype mask1 = static_cast<utype>(~utype{});
|
||||
|
||||
protected:
|
||||
type m_data;
|
||||
};
|
||||
@ -36,7 +39,7 @@ struct bf_t : bf_base<T, N>
|
||||
// Get bitmask of size N, at I pos
|
||||
static constexpr utype data_mask()
|
||||
{
|
||||
return static_cast<utype>(static_cast<utype>(~utype{} >> (bf_t::bitmax - bf_t::bitsize)) << bitpos);
|
||||
return static_cast<utype>(static_cast<utype>(bf_t::mask1 >> (bf_t::bitmax - bf_t::bitsize)) << bitpos);
|
||||
}
|
||||
|
||||
// Bitfield extraction helper
|
||||
|
Loading…
Reference in New Issue
Block a user