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

STYLE: Remove extra processing return quickly when result is known #4981

Merged

Conversation

hjmjohnson
Copy link
Member

Simplify the code by returning as soon as the condition is known to be false.
Remove unnecessary "ok" temporary variable.

PR Checklist

Simplify the code by returning as soon as the condition is known to be
false.
Remove unnecessary "ok" temporary variable.
@hjmjohnson hjmjohnson added this to the ITK 6.0 Beta 1 milestone Nov 22, 2024
@hjmjohnson hjmjohnson self-assigned this Nov 22, 2024
@github-actions github-actions bot added area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming) labels Nov 22, 2024
Copy link
Contributor

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

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

Approved (👍), but please consider a more specific commit message header, for example:

STYLE: Return quickly when result is known, in Voronoi TestHomogeneity

Also, you may of course remove those extra parentheses, if you agree.

@hjmjohnson hjmjohnson merged commit fb07d52 into InsightSoftwareConsortium:master Nov 22, 2024
17 checks passed
@hjmjohnson hjmjohnson deleted the quick-return branch November 22, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants