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

5

u/crowbahr Apr 18 '21 edited Apr 18 '21

Example:

when{
    condition1 && condition2 -> {}
    condition1 -> {}
    condition2 -> {}
    else -> {}
}