ENH: Default override 1D FFT class destructors#2804
Conversation
Mark class destructors with `override`.
Fixes:
```
In file included from /Users/builder/externalModules/Filtering/FFT/test/itkComplexToComplex1DFFTImageFilterTest.cxx:27:
[CTest: warning matched] /Users/builder/externalModules/Filtering/FFT/include/itkComplexToComplex1DFFTImageFilter.h:95:11:
warning: '~ComplexToComplex1DFFTImageFilter' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
virtual ~ComplexToComplex1DFFTImageFilter() {}
^
```
and
```
In file included from /Users/builder/externalModules/Filtering/FFT/test/itkFFT1DImageFilterTest.cxx:25:
[CTest: warning matched] /Users/builder/externalModules/Filtering/FFT/include/itkForward1DFFTImageFilter.h:78:11:
warning: '~Forward1DFFTImageFilter' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
virtual ~Forward1DFFTImageFilter() {}
^
```
and
```
In file included from /Users/builder/externalModules/Filtering/FFT/test/itkInverse1DFFTImageFilterTest.cxx:26:
[CTest: warning matched] /Users/builder/externalModules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h:79:11:
warning: '~Inverse1DFFTImageFilter' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
virtual ~Inverse1DFFTImageFilter() {}
^
```
and
```
In file included from /Users/builder/externalModules/Filtering/FFT/test/itkInverse1DFFTImageFilterTest.cxx:26:
In file included from /Users/builder/externalModules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h:102:
In file included from /Users/builder/externalModules/Filtering/FFT/include/itkInverse1DFFTImageFilter.hxx:23:
[CTest: warning matched] /Users/builder/externalModules/Filtering/FFT/include/itkVnlInverse1DFFTImageFilter.h:63:11:
warning: '~VnlInverse1DFFTImageFilter' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
virtual ~VnlInverse1DFFTImageFilter() {}
^
```
raised for example at:
https://open.cdash.org/viewBuildError.php?onlydeltap&buildid=7507381
tbirdso
left a comment
There was a problem hiding this comment.
LGTM.
Was this causing a warning somewhere?
|
@tbirdso many nightly dashboard build machines had compile errors coming from 1D FFT classes this morning. I guess this PR addresses those? |
@tbirdso Although the Azure and CircleCI builds might be passing for some given changes, these builds cover only a fraction of the configurations and toolchains that might be used to build ITK. Fortunately, Sean, Brad, Dženan, Matt and other members have set up many more builds over the years to get a more complete testing suite: So every time a PR is merged we should have a look at the dashboard the following morning to make sure that builds have improved following that PR. HTH. |
|
|
There is one more warning about getting the image dimension that this PR does not address. I am leaving that for somebody else. |
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.
d003f78 to
85e80f1
Compare
|
@jhlegarreta Could you please link the image dimension warning? The nightly build errors that I can find relating to 1D FFT classes are in regards to the destructor and will be resolved with this PR (i.e. https://open.cdash.org/viewBuildError.php?buildid=7507611) |
They are the first errors in that very link that you posted: Edit: In fact, they are errors, not warnings. |
|
Thanks @jhlegarreta , I misunderstood the dashboard. I can get a patch in. EDIT: See #2805 |
|
lgtm |
overridePR Checklist