Why not use: x = !x;?

Wow! Haven't come across that little beauty before.