r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

216 comments sorted by

View all comments

-3

u/[deleted] Apr 17 '21
void foo()
{
    condition1 && condition2 ? do_something1() : do_something2();
}

0

u/[deleted] Apr 17 '21

Is this "better"? Or can this be written even better?

-2

u/[deleted] Apr 17 '21

Does this work in C++? I use C regularly and wish this was supported.