Skip to content

Replace auto var = T{...} with T var{...}#5349

Merged
thewtex merged 2 commits intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-auto-from-local-variable-initializations
May 14, 2025
Merged

Replace auto var = T{...} with T var{...}#5349
thewtex merged 2 commits intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-auto-from-local-variable-initializations

Conversation

@N-Dekker
Copy link
Contributor

Two little style commits:

  • Replace auto var = T{} with T var{}
  • Replace auto var = T{ x } with T var{ x }

Note that these proposed changes are not at all in disagreement with clang-tidy modernize-use-auto. 😃

N-Dekker added 2 commits May 14, 2025 15:47
Replaced regular expression `auto[ ]+(\w+) = ([\w:]+){ ([^}]*) };` with
`$2 $1{ $3 };`

Aims to make the coding style more uniform.
Replaced regular expression `auto[ ]+(\w+) = ([\w:]+){};` with `$2 $1{};`

Aims to make the coding style more uniform.
@github-actions 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:Segmentation Issues affecting the Segmentation module labels May 14, 2025
@N-Dekker N-Dekker changed the title Remove auto from local variable initializations Replace auto var = T{...} with T var{...} May 14, 2025
@N-Dekker N-Dekker marked this pull request as ready for review May 14, 2025 17:07
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@thewtex thewtex merged commit 587e158 into InsightSoftwareConsortium:master May 14, 2025
16 checks passed
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: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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants