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

Rewriter: remove useless braces in a few more cases #61

Merged
merged 3 commits into from
May 10, 2021
Merged

Conversation

laurentlb
Copy link
Owner

Curly braces can be removed in this case:
if (x) y else { break; }

The previous optimization missed this case where there's a single (non-expression) statement in a block.

laurentlb added 2 commits May 10, 2021 01:36
- Oscar's Chair by Eos
- The Real Party Is In Your Pocket by Fizzer
- Long Way From Home by yx
Curly braces can be removed in this case:
  if (x) y else { break; }

The previous optimization missed this case where there's a single (non-expression) statement in a block.
@laurentlb laurentlb changed the base branch from shaders to master May 10, 2021 16:50
@laurentlb laurentlb merged commit 2c18e5f into master May 10, 2021
@laurentlb laurentlb deleted the braces branch May 10, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants