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 a redundant MAX comparison within a loop in compute_image_metrics. #89889

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

BoThompson
Copy link
Contributor

In compute_image_metrics the variable image_metric_max is set to 0 on ln4110 and the for loop on ln4112 is i=0->256. Variable image_metric_max is not set elsewhere and i is only changed in the loop increment therefore the MAX comparison on ln4117 is redundant as i will always be >= image_metric_max.

@BoThompson BoThompson requested a review from a team as a code owner March 25, 2024 18:48
@AThousandShips AThousandShips changed the title Removed a redundant MAX comparison within a loop in compute_image_metrics. Remove a redundant MAX comparison within a loop in compute_image_metrics. Mar 25, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone Mar 25, 2024
@akien-mga akien-mga changed the title Remove a redundant MAX comparison within a loop in compute_image_metrics. Remove a redundant MAX comparison within a loop in compute_image_metrics`. Mar 25, 2024
@akien-mga akien-mga changed the title Remove a redundant MAX comparison within a loop in compute_image_metrics`. Remove a redundant MAX comparison within a loop in compute_image_metrics. Mar 25, 2024
@akien-mga
Copy link
Member

The change looks fine, but could you amend the commit title to be shorter? Something like this PR title would be fine.

The current one wraps over 4 lines and refers to line numbers which will not mean much to a changelog reader. See https://github.com/godotengine/godot/blob/master/CONTRIBUTING.md#format-your-commit-messages-with-readability-in-mind for details on how commit messages should be written.

@akien-mga
Copy link
Member

Amended the commit message myself.

@BoThompson
Copy link
Contributor Author

BoThompson commented Mar 28, 2024 via email

@akien-mga akien-mga merged commit 3fdc169 into godotengine:master Apr 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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.

3 participants