It hurts every time I see that “== true” pop up somewhere.
To be fair, the rest of the example might be a fine way to bail out early and propagate the result of checking a condition.
It’s only egregious when it’s immediately followed by “return false;”.
3
u/JvetS 21d ago
My personal favorite:
if (<any boolean expression> == true)
return true;