3 ms·
This is one of those examples where I can see how it's confusing, but I just don't think you should have been doing it that way in the first place. bool foo
by copsarebastards 12y ago
This is one of those examples where I can see how it's confusing, but I just don't think you should have been doing it that way in the first place.
bool foo = (rx & 0x0800) == 0x0800;
Not only does this not have the bug, it communicates your intent better, and modern compilers are quite capable of optimizing this.