Skip to content

Conversation

@N-Dekker
Copy link
Member

It is unnecessary to call GoToBegin() on an ITK iterator when it has just been constructed, by Iterator(image, region). Such a function call just takes compile-time and run-time.

It is unnecessary to call GoToBegin() on an ITK iterator when it has just been constructed, by `Iterator(image, region)`. Such a function call just takes compile-time and run-time.

Supported by ITK pull request InsightSoftwareConsortium/ITK#4815 "Document that Iterator(image, region) constructors initialize at the begin, add GTest unit test"
Avoided funny-looking empty "init-statements", as in `for (; !it.IsAtEnd(); ++it)`. Reduced the scope of those iterator variables, following C++ Core Guidelines, May 11, 2024, "Keep scopes small",  https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-scope
@N-Dekker N-Dekker merged commit c381ee2 into main Aug 27, 2024
@N-Dekker N-Dekker deleted the Remove-GoToBegin branch August 27, 2024 08: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