Skip to content

Commit 5a46ecd

Browse files
committed
STYLE: Prefer = default to explicitly trivial implementations
This check replaces default bodies of special member functions with = default;. The explicitly defaulted function declarations enable more opportunities in optimization, because the compiler might treat explicitly defaulted functions as trivial. Additionally, the C++11 use of = default more clearly expreses the intent for the special member functions.
1 parent 67f7ea3 commit 5a46ecd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

include/itkCoocurrenceTextureFeaturesImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class ITK_TEMPLATE_EXPORT CoocurrenceTextureFeaturesImageFilter : public ImageTo
214214
using NeighborIndexType = typename NeighborhoodIteratorType::NeighborIndexType;
215215

216216
CoocurrenceTextureFeaturesImageFilter();
217-
~CoocurrenceTextureFeaturesImageFilter() override {}
217+
~CoocurrenceTextureFeaturesImageFilter() override = default;
218218

219219
bool
220220
IsInsideNeighborhood(const OffsetType & iteratedOffset);

include/itkDigitizerFunctor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Digitizer
4747
, m_Max(max)
4848
{}
4949

50-
~Digitizer() {}
50+
~Digitizer() = default;
5151

5252
bool
5353
operator!=(const Digitizer & other) const

include/itkFirstOrderTextureFeaturesImageFilter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT FirstOrderTextureFeaturesImageFilter
9696
return 8;
9797
}
9898

99-
FirstOrderTextureFeaturesImageFilter() {}
99+
FirstOrderTextureFeaturesImageFilter() = default;
100100

101101
void
102102
GenerateOutputInformation() override
@@ -118,7 +118,7 @@ class ITK_TEMPLATE_EXPORT FirstOrderTextureFeaturesImageFilter
118118
}
119119

120120

121-
~FirstOrderTextureFeaturesImageFilter() override {}
121+
~FirstOrderTextureFeaturesImageFilter() override = default;
122122
};
123123
} // end namespace itk
124124

include/itkRunLengthTextureFeaturesImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter : public ImageToIm
238238
using NeighborIndexType = typename NeighborhoodIteratorType::NeighborIndexType;
239239

240240
RunLengthTextureFeaturesImageFilter();
241-
~RunLengthTextureFeaturesImageFilter() override {}
241+
~RunLengthTextureFeaturesImageFilter() override = default;
242242

243243
void
244244
NormalizeOffsetDirection(OffsetType & offset);

0 commit comments

Comments
 (0)