if (redrawMethod & RS2::RedrawGrid)
...
if (redrawMethod & RS2::RedrawDrawing)
...
if (redrawMethod & RS2::RedrawOverlay)
...
RedrawNone = 0
RedrawGrid = 1
RedrawOverlay = 2
RedrawDrawing = 4
RedrawAll = 0xffff
https://en.wikipedia.org/wiki/Bitwise_operation#ANDI don't understand the point of these expressions.
If 0xffff & 2 evaluates to true, then 0xffff alone will evaluate to true.
If 0 & 2 evaluates to false, then 0 alone will evaluate to false.
Isn't the right side superfluous?
In otherwords, can't we just simplify it to one condition: if (redrawMethod) ?