Skip to content

Commit

Permalink
STYLE: Default default-constructor BSplineBaseTransform
Browse files Browse the repository at this point in the history
Removed unnecessary `m_InternalParametersBuffer = ParametersType(0)` assignment
and `Superclass(0)` constructor call.
  • Loading branch information
N-Dekker authored and dzenanz committed Mar 29, 2023
1 parent ed7ad92 commit 94f5a43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Modules/Core/Transform/include/itkBSplineBaseTransform.h
Expand Up @@ -338,7 +338,7 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : public Transform<TParametersVal
void
PrintSelf(std::ostream & os, Indent indent) const override;

BSplineBaseTransform();
BSplineBaseTransform() = default;
~BSplineBaseTransform() override = default;

/** Get/Set to allow subclasses to access and manipulate the weights function. */
Expand Down Expand Up @@ -392,13 +392,13 @@ class ITK_TEMPLATE_EXPORT BSplineBaseTransform : public Transform<TParametersVal
* in each dimension wrapped from the flat parameters in
* m_InternalParametersBuffer
*/
CoefficientImageArray m_CoefficientImages{};
CoefficientImageArray m_CoefficientImages{ Self::ArrayOfImagePointerGeneratorHelper() };

/** Internal parameters buffer. */
ParametersType m_InternalParametersBuffer{};

/** Pointer to function used to compute Bspline interpolation weights. */
typename WeightsFunctionType::Pointer m_WeightsFunction{};
typename WeightsFunctionType::Pointer m_WeightsFunction{ WeightsFunctionType::New() };

private:
static CoefficientImageArray
Expand Down
12 changes: 0 additions & 12 deletions Modules/Core/Transform/include/itkBSplineBaseTransform.hxx
Expand Up @@ -26,18 +26,6 @@
namespace itk
{

// Constructor with default arguments
template <typename TParametersValueType, unsigned int VDimension, unsigned int VSplineOrder>
BSplineBaseTransform<TParametersValueType, VDimension, VSplineOrder>::BSplineBaseTransform()
: Superclass(0)
, m_CoefficientImages(Self::ArrayOfImagePointerGeneratorHelper())
{
this->m_InternalParametersBuffer = ParametersType(0);

// Instantiate a weights function
this->m_WeightsFunction = WeightsFunctionType::New();
}

// Set the parameters
template <typename TParametersValueType, unsigned int VDimension, unsigned int VSplineOrder>
void
Expand Down

0 comments on commit 94f5a43

Please sign in to comment.