3 ms·
I don't know if it'd be clearer. It'd be a better representation of what actually happens but would read very strangely. `!= -1` would make a reader think "shou
by masklinn 11y ago
I don't know if it'd be clearer. It'd be a better representation of what actually happens but would read very strangely. `!= -1` would make a reader think "shouldn't go below 0" and only on closer inspection would you wonder what actually happens, `!= SIZE_MAX` would probably make any reader stop and scratch their head.
Whether that's a good thing is up for debate.
- plonh 11y agoif you are thinking about "<0" on an unsigned type, you better be scratching your head already.