You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unnecessary to first left shift the mask to match the
relevant bits of value stored in "bits", because after the mask
is applied (`bits & mask`), this value will be shifted back right
anyway.
So it's easier to first shift "bits" to the right (and thus discard the
least significant bits of it, which are no longer part of the value
we want to read - but they remain in "bits" property for later fields,
note that we don't reassign it while shifting) and then AND with
the unchanged mask.
It saves one useless operation and reduces cognitive load - this way
is more straightforward.
0 commit comments