r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

216 comments sorted by

View all comments

772

u/dyingpie1 Apr 17 '21

I would rewrite it as

If (!condition1) do_anything2()
Else if (condition2) do_anything1()

154

u/Bence675 Apr 17 '21

You're right, i changed for this

39

u/dyingpie1 Apr 17 '21

Ay, me and u are the same person now!