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:
Yuri Kunde Schlesner 2015-07-11 22:29:16 -04:00 committed by Lioncash
parent c334a6ca65
commit 5c264281eb
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ public:
if (std::numeric_limits<T>::is_signed)
{
std::size_t shift = 8 * sizeof(T) - bits;
return (T)(((storage & GetMask()) << (shift - position)) >> shift);
return (T)((storage << (shift - position)) >> shift);
}
else
{