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