mirror of
https://github.com/PabloMK7/citra
synced 2024-11-16 05:38:24 +00:00
Common: Remove redundant masking in BitField
For the signed case, the shifts already remove the rest of the value, so ANDing by the mask is redundant.
This commit is contained in:
parent
d7f9529bdd
commit
d5b5280501
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ public:
|
||||||
if (std::numeric_limits<T>::is_signed)
|
if (std::numeric_limits<T>::is_signed)
|
||||||
{
|
{
|
||||||
std::size_t shift = 8 * sizeof(T)-bits;
|
std::size_t shift = 8 * sizeof(T)-bits;
|
||||||
return (T)(((storage & GetMask()) << (shift - position)) >> shift);
|
return (T)((storage << (shift - position)) >> shift);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue