Skip to content

Commit 3671be2

Browse files
hjmjohnsondzenanz
authored andcommitted
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 ac4c234 commit 3671be2

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Modules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.hxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
namespace itk
2626
{
2727
template <typename TInputImage, typename TOutputImage>
28-
ComplexToComplex1DFFTImageFilter<TInputImage, TOutputImage>::ComplexToComplex1DFFTImageFilter()
29-
{}
28+
ComplexToComplex1DFFTImageFilter<TInputImage, TOutputImage>::ComplexToComplex1DFFTImageFilter() = default;
3029

3130

3231
template <typename TInputImage, typename TOutputImage>

Modules/Filtering/FFT/include/itkFFTWCommonExtended.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class ComplexToComplexProxy
4646
{
4747
// empty -- only double and float specializations work
4848
protected:
49-
ComplexToComplexProxy(){};
50-
~ComplexToComplexProxy(){};
49+
ComplexToComplexProxy() = default;
50+
~ComplexToComplexProxy() = default;
5151
};
5252

5353
#if defined(ITK_USE_FFTWF)

Modules/Filtering/FFT/include/itkForward1DFFTImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace itk
2626
template <typename TInputImage, typename TOutputImage>
2727
Forward1DFFTImageFilter<TInputImage, TOutputImage>::Forward1DFFTImageFilter()
2828

29-
{}
29+
= default;
3030

3131

3232
template <typename TInputImage, typename TOutputImage>

Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace itk
2727
template <typename TInputImage, typename TOutputImage>
2828
Inverse1DFFTImageFilter<TInputImage, TOutputImage>::Inverse1DFFTImageFilter()
2929

30-
{}
30+
= default;
3131

3232

3333
template <typename TInputImage, typename TOutputImage>

0 commit comments

Comments
 (0)