Skip to content

Conversation

DanielEScherzer
Copy link
Member

The do-while trick is used to allow including multiple statements where only one is expected, but in this case we know that the uses on the next few lines permit including multiple statements, so the extra do-while wrapper is unneeded.

The do-while trick is used to allow including multiple statements where only
one is expected, but in this case we know that the uses on the next few lines
permit including multiple statements, so the extra do-while wrapper is
unneeded.
@iluuu1994
Copy link
Member

do {} while (0) are considered best-practice for macros. You'll find them in many cases where they aren't strictly necessary. Removing them doesn't add much value.

@iluuu1994
Copy link
Member

As explained here: #15925 (comment) 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants