ITK
ITK copied to clipboard
STYLE: Replace Fill calls with `auto var = itk::MakeFilled<T>` in tests
Replaced code of the form
T var;
var.Fill(x);
with auto var = itk::MakeFilled<T>(x);
Following C++ Core Guidelines, Oct 3, 2024, "Always initialize an object", https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-always
Using Notepad++, Replace in Files, doing:
Find what: ^( [ ]+)([^ ].*)[ ]+(\w+);[\r\n]+\1\3\.Fill\(
Replace with: $1auto $3 = itk::MakeFilled<$2>\(
Filters: itk*Test*.cxx
[v] Match case
(*) Regular expression
Follow-up to
- pull request https://github.com/InsightSoftwareConsortium/ITK/pull/4881
- pull request https://github.com/InsightSoftwareConsortium/ITK/pull/4884
- pull request https://github.com/InsightSoftwareConsortium/ITK/pull/4887