4 ms·
I'm quite surprised there isn't a compiler warning for a bitwise operator at the root of a condition. I've been writing `if ((flags & FLAG) != 0)` for decades y
by kps 5y ago
I'm quite surprised there isn't a compiler warning for a bitwise operator at the root of a condition. I've been writing `if ((flags & FLAG) != 0)` for decades years for nothing?!?
- exikyut 5y agoHmm. In all seriousness, you could probably build a lint rule/tool to allow only the format you note.