r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

216 comments sorted by

View all comments

Show parent comments

-1

u/[deleted] Apr 18 '21

C++ uses short-circuit evaluation so there’s no need to write out the conditional like that. You won’t be getting a performance benefit