Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lingering do/while(0) defines #90218

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Apr 4, 2024

The majority of do { x } while (0/false) defines across the repo have already been replaced with if [constexpr] (true) { x } else ((void)0), but a handful were still kicking. This PR removes the last of them, replacing them with the newer syntax.

@Repiteo Repiteo requested a review from a team as a code owner April 4, 2024 19:20
#else
#define CHULL_ASSERT(m_cond) \
do { \
} while (0)
if constexpr (true) { \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case could maybe be an empty macro, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically yes, but this enforces a semicolon

@akien-mga akien-mga added this to the 4.3 milestone Apr 4, 2024
@akien-mga akien-mga merged commit 0ff056e into godotengine:master Apr 5, 2024
17 checks passed
@akien-mga
Copy link
Member

Thanks!

@Repiteo Repiteo deleted the do-while-false-cleanup branch April 17, 2024 17:27
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