Skip to content

Commit

Permalink
STYLE: Remove public defaulted default-constructor/destructor pairs
Browse files Browse the repository at this point in the history
Following the C++ Rule of Zero. May also prevent some clang warnings
(https://clang.llvm.org/docs/DiagnosticsReference.html#wdeprecated-copy-with-dtor),
saying:

> warning: definition of implicit copy [...] is deprecated because it has a user-declared destructor

Found with Notepad++, using the following regular expression:

    ([^ ]+)\(\) = default;\r\n  ~\1\(\) = default;
  • Loading branch information
N-Dekker authored and hjmjohnson committed Jan 22, 2024
1 parent d3cc874 commit a8f034d
Show file tree
Hide file tree
Showing 53 changed files with 0 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ template <typename TInput, typename TOutput>
class VectorCast
{
public:
VectorCast() = default;
~VectorCast() = default;
bool
operator!=(const VectorCast &) const
{
Expand Down
4 changes: 0 additions & 4 deletions Modules/Core/Common/include/itkBresenhamLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ class ITK_TEMPLATE_EXPORT BresenhamLine
using OffsetArray = std::vector<OffsetType>;
using IndexArray = std::vector<IndexType>;

// constructors
BresenhamLine() = default;
~BresenhamLine() = default;

/** Build a line in a specified Direction. */
OffsetArray
BuildLine(LType Direction, IdentifierType length);
Expand Down
3 changes: 0 additions & 3 deletions Modules/Core/Common/include/itkDefaultPixelAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ template <typename TType>
class ITK_TEMPLATE_EXPORT DefaultPixelAccessor
{
public:
DefaultPixelAccessor() = default;
~DefaultPixelAccessor() = default;

/** External type alias. It defines the external aspect
* that this class will exhibit. */
using ExternalType = TType;
Expand Down
3 changes: 0 additions & 3 deletions Modules/Core/Common/include/itkPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,6 @@ class ITK_TEMPLATE_EXPORT BarycentricCombination
using PointType = typename PointContainerType::Element;
using WeightContainerType = TWeightContainer;

BarycentricCombination() = default;
~BarycentricCombination() = default;

static PointType
Evaluate(const PointContainerPointer & points, const WeightContainerType & weights);
};
Expand Down
3 changes: 0 additions & 3 deletions Modules/Core/Common/include/itkSymmetricEigenAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,6 @@ class ITK_TEMPLATE_EXPORT SymmetricEigenAnalysisFixedDimension
static constexpr EigenValueOrderEnum DoNotOrder = EigenValueOrderEnum::DoNotOrder;
#endif

SymmetricEigenAnalysisFixedDimension() = default;
~SymmetricEigenAnalysisFixedDimension() = default;

using MatrixType = TMatrix;
using EigenMatrixType = TEigenMatrix;
using VectorType = TVector;
Expand Down
2 changes: 0 additions & 2 deletions Modules/Core/Common/test/itkSimpleFilterWatcherTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ template <typename TInput, typename TOutput>
class TanHelper
{
public:
TanHelper() = default;
~TanHelper() = default;
bool
operator==(const TanHelper & rhs) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ template <typename TInput1, typename TInput2, typename TInput3, typename TOutput
class ITK_TEMPLATE_EXPORT LandweberMethod
{
public:
LandweberMethod() = default;
~LandweberMethod() = default;

bool
operator==(const LandweberMethod &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class TensorFractionalAnisotropyFunction
{
public:
using RealValueType = typename TInput::RealValueType;
TensorFractionalAnisotropyFunction() = default;
~TensorFractionalAnisotropyFunction() = default;
bool
operator==(const TensorFractionalAnisotropyFunction &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class TensorRelativeAnisotropyFunction
{
public:
using RealValueType = typename TInput::RealValueType;
TensorRelativeAnisotropyFunction() = default;
~TensorRelativeAnisotropyFunction() = default;
bool
operator==(const TensorRelativeAnisotropyFunction &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class AbsoluteValueDifference2
{
public:
AbsoluteValueDifference2() = default;
~AbsoluteValueDifference2() = default;
bool
operator==(const AbsoluteValueDifference2 &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class SquaredDifference2
{
public:
SquaredDifference2() = default;
~SquaredDifference2() = default;
bool
operator==(const SquaredDifference2 &) const
{
Expand Down
3 changes: 0 additions & 3 deletions Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ template <typename TPixel1, typename TPixel2>
class JoinFunctor
{
public:
JoinFunctor() = default;
~JoinFunctor() = default;

/** Standard type alias */
using Self = JoinFunctor;

Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkAbsImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ template <typename TInput, typename TOutput>
class Abs
{
public:
Abs() = default;
~Abs() = default;
bool
operator==(const Abs &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Acos
{
public:
Acos() = default;
~Acos() = default;
bool
operator==(const Acos &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT Add2
{
public:
Add2() = default;
~Add2() = default;
bool
operator==(const Add2 &) const
{
Expand All @@ -61,8 +59,6 @@ template <typename TInput1, typename TInput2, typename TInput3, typename TOutput
class ITK_TEMPLATE_EXPORT Add3
{
public:
Add3() = default;
~Add3() = default;
bool
operator==(const Add3 &) const
{
Expand All @@ -88,8 +84,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT Sub2
{
public:
Sub2() = default;
~Sub2() = default;
bool
operator==(const Sub2 &) const
{
Expand All @@ -115,8 +109,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT Mult
{
public:
Mult() = default;
~Mult() = default;
bool
operator==(const Mult &) const
{
Expand All @@ -142,8 +134,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class ITK_TEMPLATE_EXPORT Div
{
public:
Div() = default;
~Div() = default;
bool
operator==(const Div &) const
{
Expand Down Expand Up @@ -217,9 +207,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class ITK_TEMPLATE_EXPORT Modulus
{
public:
Modulus() = default;
~Modulus() = default;

bool
operator==(const Modulus &) const
{
Expand Down Expand Up @@ -368,8 +355,6 @@ template <class TInput1, class TOutput = TInput1>
class UnaryMinus
{
public:
UnaryMinus() = default;
~UnaryMinus() = default;
bool
operator==(const UnaryMinus &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Asin
{
public:
Asin() = default;
~Asin() = default;
bool
operator==(const Asin &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class Atan2
{
public:
Atan2() = default;
~Atan2() = default;
bool
operator==(const Atan2 &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Atan
{
public:
Atan() = default;
~Atan() = default;
bool
operator==(const Atan &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class Modulus2
{
public:
Modulus2() = default;
~Modulus2() = default;
bool
operator==(const Modulus2 &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT AND
{
public:
AND() = default;
~AND() = default;
bool
operator==(const AND &) const
{
Expand All @@ -60,8 +58,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT OR
{
public:
OR() = default;
~OR() = default;
bool
operator==(const OR &) const
{
Expand All @@ -86,8 +82,6 @@ template <typename TInput1, typename TInput2 = TInput1, typename TOutput = TInpu
class ITK_TEMPLATE_EXPORT XOR
{
public:
XOR() = default;
~XOR() = default;
bool
operator==(const XOR &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ template <typename TInput, typename TOutput>
class BoundedReciprocal
{
public:
BoundedReciprocal() = default;
~BoundedReciprocal() = default;
bool
operator==(const BoundedReciprocal &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ template <typename TInput, typename TOutput>
class ComplexToImaginary
{
public:
ComplexToImaginary() = default;
~ComplexToImaginary() = default;
bool
operator==(const ComplexToImaginary &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ template <typename TInput, typename TOutput>
class ComplexToModulus
{
public:
ComplexToModulus() = default;
~ComplexToModulus() = default;
bool
operator==(const ComplexToModulus &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ template <typename TInput, typename TOutput>
class ComplexToPhase
{
public:
ComplexToPhase() = default;
~ComplexToPhase() = default;
bool
operator==(const ComplexToPhase &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ template <typename TInput, typename TOutput>
class ComplexToReal
{
public:
ComplexToReal() = default;
~ComplexToReal() = default;
bool
operator==(const ComplexToReal &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class ConstrainedValueAddition
{
public:
ConstrainedValueAddition() = default;
~ConstrainedValueAddition() = default;
bool
operator==(const ConstrainedValueAddition &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ template <typename TInput1, typename TInput2, typename TOutput>
class ConstrainedValueDifference
{
public:
ConstrainedValueDifference() = default;
~ConstrainedValueDifference() = default;
bool
operator==(const ConstrainedValueDifference &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Cos
{
public:
Cos() = default;
~Cos() = default;
bool
operator==(const Cos &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ template <typename TInput, typename TOutput>
class EdgePotential
{
public:
EdgePotential() = default;
~EdgePotential() = default;
bool
operator==(const EdgePotential &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Exp
{
public:
Exp() = default;
~Exp() = default;
bool
operator==(const Exp &) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Log10
{
public:
Log10() = default;
~Log10() = default;
bool
operator==(const Log10 &) const
{
Expand Down
2 changes: 0 additions & 2 deletions Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ template <typename TInput, typename TOutput>
class Log
{
public:
Log() = default;
~Log() = default;
bool
operator==(const Log &) const
{
Expand Down
Loading

0 comments on commit a8f034d

Please sign in to comment.