Remove GoToBegin() calls on local ImageRegionIteratorWithIndex variables#5736
Merged
dzenanz merged 2 commits intoInsightSoftwareConsortium:mainfrom Jan 21, 2026
Conversation
The `ImageRegionConstIteratorWithIndex(image, region)` constructor does already initialize the iterator at the begin of its region.
The `ImageRegionIteratorWithIndex(image, region)` constructor does already initialize the iterator at the begin of its region.
dzenanz
approved these changes
Jan 21, 2026
Contributor
Author
|
I think we can ignore the failure of ITK.macOS.Arm64 / macOS-x86_64-rosetta (pull_request) https://open.cdash.org/tests/2361124478 just reports a failure of vnl_test_hungarian_algorithm, which is unrelated to this PR: Test: vnl_test_hungarian_algorithm (Failed) |
4427670
into
InsightSoftwareConsortium:main
15 of 17 checks passed
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Feb 15, 2026
Reduced the scope of the local `inputIt` variable in `GenerateDataForLabels()`, by moving its declaration into the _init-statement_ of its `for` loop. Following C++ Core Guidelines, Jul 8, 2025 "Declare names in for-statement initializers and conditions to limit scope", https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-cond Removed the `inputIt.GoToBegin()` call, following pull request InsightSoftwareConsortium#5736 commit f10bd8f "STYLE: Remove GoToBegin() calls on ImageRegionIteratorWithIndex"
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Feb 15, 2026
Reduced the scope of the local `inputIt` variable in `GenerateDataForLabels()`, by moving its declaration into the _init-statement_ of its `for` loop. Following C++ Core Guidelines, Jul 8, 2025 "Declare names in for-statement initializers and conditions to limit scope", https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-cond Removed the `inputIt.GoToBegin()` call, following pull request InsightSoftwareConsortium#5736 commit f10bd8f "STYLE: Remove GoToBegin() calls on ImageRegionIteratorWithIndex"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Iterator(image, region)constructors of ImageRegionIteratorWithIndex and ImageRegionConstIteratorWithIndex do alreadyinitialize the iterator at the begin of its region.