Skip to content

Commit 4700ca1

Browse files
committed
STYLE: Use auto for variable type matches the type of the initializer expression
This check is responsible for using the auto type specifier for variable declarations to improve code readability and maintainability. The auto type specifier will only be introduced in situations where the variable type matches the type of the initializer expression. In other words auto should deduce the same type that was originally spelled in the source
1 parent 11a8f2d commit 4700ca1

File tree

7 files changed

+1
-9
lines changed

7 files changed

+1
-9
lines changed

src/Core/Common/CustomOperationToEachPixelInImage/Code.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ class RotateVectors
2727
{
2828
public:
2929
RotateVectors() = default;
30-
;
3130
~RotateVectors() = default;
32-
;
3331
bool
3432
operator!=(const RotateVectors &) const
3533
{

src/Developer/itkOilPaintingImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ OilPaintingImageFilter<TImage>::DynamicThreadedGenerateData(const typename TImag
4949
itk::ImageRegionIterator<TImage> out(output, outputRegionForThread);
5050
itk::ConstNeighborhoodIterator<TImage> it(m_Radius, input, outputRegionForThread);
5151

52-
unsigned long long * bins = new unsigned long long[m_NumberOfBins];
52+
auto * bins = new unsigned long long[m_NumberOfBins];
5353

5454
while (!out.IsAtEnd())
5555
{

src/Numerics/Optimizers/AmoebaOptimizer/ExampleCostFunction.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ class ExampleCostFunction2 : public SingleValuedCostFunction
4343

4444
protected:
4545
ExampleCostFunction2() = default;
46-
;
4746
~ExampleCostFunction2() override = default;
48-
;
4947

5048
private:
5149
ExampleCostFunction2(const Self &) = delete; // purposely not implemented

src/Numerics/Optimizers/ExhaustiveOptimizer/Code.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class CommandIterationUpdate : public itk::Command
3636

3737
protected:
3838
CommandIterationUpdate() = default;
39-
;
4039

4140
public:
4241
using OptimizerType = itk::ExhaustiveOptimizerv4<double>;

src/Numerics/Optimizers/LevenbergMarquardtOptimization/itkExampleCostFunction.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ class ExampleCostFunction : public MultipleValuedCostFunction
9393
}
9494
};
9595
~ExampleCostFunction() override = default;
96-
;
9796

9897
private:
9998
ExampleCostFunction(const Self &) = delete; // purposely not implemented

src/Registration/Common/PerformMultiModalityRegistrationWithMutualInformation/Code.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class CommandIterationUpdate : public itk::Command
6767

6868
protected:
6969
CommandIterationUpdate() = default;
70-
;
7170

7271
public:
7372
using OptimizerType = itk::GradientDescentOptimizer;

src/Registration/Common/WatchRegistration/Code.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class IterationUpdate : public itk::Command
5858

5959
protected:
6060
IterationUpdate() = default;
61-
;
6261

6362
public:
6463
using InternalImageType = itk::Image<float, 2>;

0 commit comments

Comments
 (0)