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

Remove needless branch, clean up variable names. #234

Merged
merged 2 commits into from
Aug 28, 2020

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Aug 28, 2020

Motivation:

No point having conditional branches when the branch is always taken!
This doesn't hurt perf at all, the optimiser will trivially see through
this, but it does hurt readability. Relatedly, the single-letter
variable names here aren't great.

Modifications:

  • Removed needless branch.
  • Gave the variables better names.

Result:

Easier to understand code.

Motivation:

No point having conditional branches when the branch is always taken!
This doesn't hurt perf at all, the optimiser will trivially see through
this, but it does hurt readability. Relatedly, the single-letter
variable names here aren't great.

Modifications:

- Removed needless branch.
- Gave the variables better names.

Result:

Easier to understand code.
@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Aug 28, 2020
@Lukasa Lukasa requested a review from glbrntt August 28, 2020 07:59
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Nice one.

@glbrntt glbrntt merged commit 7d366b1 into apple:master Aug 28, 2020
@Lukasa Lukasa deleted the cb-remove-needless-branch branch August 28, 2020 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants