-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
Modernize initialization of local SmartPointer variables #4964
Merged
hjmjohnson
merged 2 commits into
InsightSoftwareConsortium:master
from
N-Dekker:Modernize-Pointer-initializations
Nov 20, 2024
Merged
Modernize initialization of local SmartPointer variables #4964
hjmjohnson
merged 2 commits into
InsightSoftwareConsortium:master
from
N-Dekker:Modernize-Pointer-initializations
Nov 20, 2024
Conversation
This file contains 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
Using Notepad++, Replace in Files, doing: Find what: ^( [ ]+)([^ ][^=\r\n]*::Pointer)([ ]+)(\w+);[\r\n]+\1\4\ = Replace with: $1$2$3$4 = Filters: itk*.* !+\test Directory: D:\src\ITK\Modules [v] Match case (*) Regular expression - Follow-up to pull request InsightSoftwareConsortium#4952 commit b4b8e7b
Using Notepad++, Replace in Files, doing: Find what: ^( [ ]+)(typename )?([^ ].+)::Pointer[ ]+(\w+[ ]+= \3::New\(\);) Find what: ^( [ ]+)(typename )?([^ ].+)::Pointer[ ]+(\w+[ ]+=\r\n\1 \3::New\(\);) Replace with: $1auto $4 Filters: itk*.* !+\test Directory: D:\src\ITK\Modules [v] Match case (*) Regular expression Manually excluded the initialization of `m_ConvolutionImageFilter` (in "itkFFTDiscreteGaussianImageFilter.h") as it is not a local variable. Follow-up to pull request InsightSoftwareConsortium#2826 commit 5ab79bc "STYLE: Use `auto` for declaration of variables initialized by `New()`"
github-actions
bot
added
type:Testing
Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
area:Core
Issues affecting the Core module
area:Filtering
Issues affecting the Filtering module
area:IO
Issues affecting the IO module
area:Registration
Issues affecting the Registration module
area:Segmentation
Issues affecting the Segmentation module
area:Numerics
Issues affecting the Numerics module
labels
Nov 20, 2024
Did you include the Examples directory with these changes? |
hjmjohnson
approved these changes
Nov 20, 2024
No, I only included files from "ITK/Modules", thanks for reminding me, Bradley! Would be nice for a follow-up! (I'd rather not include them with this PR, as it is already quite large: over 100 code changes.) |
/azp run ITK.macOS.Python |
dzenanz
approved these changes
Nov 20, 2024
7 tasks
hjmjohnson
merged commit Nov 20, 2024
677b761
into
InsightSoftwareConsortium:master
17 checks passed
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Nov 20, 2024
Using Notepad++, Replace in Files, doing: Find what: ^( [ ]+)([^ ][^=\r\n]*[Ii]terator[^=\r\n]*)([ ]+)(\w+[Ii]t);[\r\n]+\1\4\ = Replace with: $1$2$3$4 = Filters: itk*.* !+\test Directory: D:\src\ITK\Modules [v] Match case (*) Regular expression - Follow-up to pull request InsightSoftwareConsortium#4964 commit 4926511 "STYLE: Replace `Pointer var; var = x` with `Pointer var = x`"
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Nov 20, 2024
Using Notepad++, Replace in Files, doing: Find what: ^( [ ]+)([^ ][^=\r\n]*[Ii]terator[^=\r\n]*)([ ]+)(\w+[Ii]t);[\r\n]+\1\4\ = Replace with: $1$2$3$4 = Filters: itk*.* !+\test Directory: D:\src\ITK\Modules [v] Match case (*) Regular expression - Follow-up to pull request InsightSoftwareConsortium#4964 commit 4926511 "STYLE: Replace `Pointer var; var = x` with `Pointer var = x`"
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Nov 21, 2024
- Follow-up to pull request InsightSoftwareConsortium#4964 commit 4926511 "STYLE: Replace `Pointer var; var = x` with `Pointer var = x`" Triggered by a comment by Bradley Lowekamp at InsightSoftwareConsortium#4964 (comment)
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
Nov 21, 2024
- Follow-up to pull request InsightSoftwareConsortium#4964 commit 677b761 "STYLE: Replace T::Pointer with auto when initializing variables by New()" Triggered by a comment by Bradley Lowekamp at InsightSoftwareConsortium#4964 (comment)
hjmjohnson
pushed a commit
that referenced
this pull request
Nov 21, 2024
- Follow-up to pull request #4964 commit 4926511 "STYLE: Replace `Pointer var; var = x` with `Pointer var = x`" Triggered by a comment by Bradley Lowekamp at #4964 (comment)
hjmjohnson
pushed a commit
that referenced
this pull request
Nov 21, 2024
- Follow-up to pull request #4964 commit 677b761 "STYLE: Replace T::Pointer with auto when initializing variables by New()" Triggered by a comment by Bradley Lowekamp at #4964 (comment)
hjmjohnson
pushed a commit
that referenced
this pull request
Nov 21, 2024
Using Notepad++, Replace in Files, doing: Find what: ^( [ ]+)([^ ][^=\r\n]*[Ii]terator[^=\r\n]*)([ ]+)(\w+[Ii]t);[\r\n]+\1\4\ = Replace with: $1$2$3$4 = Filters: itk*.* !+\test Directory: D:\src\ITK\Modules [v] Match case (*) Regular expression - Follow-up to pull request #4964 commit 4926511 "STYLE: Replace `Pointer var; var = x` with `Pointer var = x`"
N-Dekker
added a commit
to SuperElastix/elastix
that referenced
this pull request
Nov 22, 2024
- Following ITK pull request InsightSoftwareConsortium/ITK#4964 commit InsightSoftwareConsortium/ITK@677b761
N-Dekker
added a commit
to SuperElastix/elastix
that referenced
this pull request
Nov 23, 2024
- Following ITK pull request InsightSoftwareConsortium/ITK#4964 commit InsightSoftwareConsortium/ITK@677b761
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:Core
Issues affecting the Core module
area:Filtering
Issues affecting the Filtering module
area:IO
Issues affecting the IO module
area:Numerics
Issues affecting the Numerics module
area:Registration
Issues affecting the Registration module
area:Segmentation
Issues affecting the Segmentation module
type:Testing
Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
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.
Two style commits:
T::Pointer var; var = x
withT::Pointer var = x
, following pull request ReplaceT var; var = x
withT var = x
forRegion
,Index
, andSize
variables #4952T::Pointer
withauto
when initializing variables byT::New()
, following pull request STYLE: Useauto
for declaration of variables initialized byNew()
#2826