What was not mentioned is that the operators &= and |= can be overloaded. So the code you posted depends on the type of nState (although it is quite clearly an int, so most likely this is not applicable here). Overloading &= does not imply overloading & , therefore, in this case
x &= y might not be the same as x = x & y
This may also depend on what TOOL_TIPS_VISIBLE .
struct s{ int x; }; void operator &= (int& x, sy) { x = 0; }
Now that you do:
s TOOL_TIPS_VISIBLE; x &= TOOL_TIPS_VISIBLE;
x will become 0 . Again, it is unlikely, but nonetheless useful to know.
All other answers are probably applicable here, but it is worth considering.
Luchian grigore
source share