STYLE: Use auto for declaration of variables initialized by New()#165
Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom Oct 25, 2021
Conversation
Replaced initializations of the form `T::Pointer var = T::New()` with `auto var = T::New()`, in accordance with ITK Coding Style section "The auto Keyword", at https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/v5.2.1/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex#L1507-L1511 Using Notepad++ v8.1.4, Find in Files (Regular expression): Find what: (\w+)::Pointer[ ]+(\w+) = \1::New\(\); Replace with: auto $2 = $1::New\(\); Corresponding ITK pull request: InsightSoftwareConsortium/ITK#2826
hjmjohnson
approved these changes
Oct 25, 2021
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.
Replaced initializations of the form
T::Pointer var = T::New()with
auto var = T::New(), in accordance with ITK Coding Style section"The auto Keyword", at
https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/v5.2.1/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex#L1507-L1511
Using Notepad++ v8.1.4, Find in Files (Regular expression):
Corresponding ITK pull request: InsightSoftwareConsortium/ITK#2826