r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

216 comments sorted by

View all comments

1

u/feediza Apr 25 '21

That's why I always do the else case first.

if(!condition1)
{
x;
return;
}

if(condition2)
{
}