Skip to content

Commit

Permalink
STYLE: Move empty const member functions from .hxx to .h
Browse files Browse the repository at this point in the history
Moved the member function definitions of `const`member functions that have an empty
member function definition from their "itk*.hxx" file to the corresponding
"itk*.h" file, and into their class definition.

Found by regular expression `^..[^:,].+\) const\r\n{}` in "itk*.hxx" files.

- Follow-up to pull request InsightSoftwareConsortium#5198
commit b94770d
"STYLE: Move empty member functions with empty param list from .hxx to .h"
  • Loading branch information
N-Dekker committed Feb 6, 2025
1 parent ee1f1fc commit 1ff5932
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
3 changes: 2 additions & 1 deletion Modules/Filtering/LabelMap/include/itkLabelObjectLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ class ITK_TEMPLATE_EXPORT LabelObjectLine
PrintHeader(std::ostream & os, Indent indent) const;

virtual void
PrintTrailer(std::ostream & os, Indent indent) const;
PrintTrailer(std::ostream & itkNotUsed(os), Indent itkNotUsed(indent)) const
{}

private:
IndexType m_Index{};
Expand Down
8 changes: 0 additions & 8 deletions Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,6 @@ LabelObjectLine<VImageDimension>::PrintSelf(std::ostream & os, Indent indent) co
os << indent << "Index: " << this->m_Index << std::endl;
os << indent << "Length: " << this->m_Length << std::endl;
}

/**
* Define a default print trailer for all objects.
*/
template <unsigned int VImageDimension>
void
LabelObjectLine<VImageDimension>::PrintTrailer(std::ostream & itkNotUsed(os), Indent itkNotUsed(indent)) const
{}
} // namespace itk

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric

/** Get the derivatives of the match measure. */
void
GetDerivative(const TransformParametersType & parameters, DerivativeType & Derivative) const override;
GetDerivative(const TransformParametersType & itkNotUsed(parameters),
DerivativeType & itkNotUsed(derivative)) const override
{}

/** Get the match measure, i.e. the value for single valued optimizers. */
MeasureType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ EuclideanDistancePointMetric<TFixedPointSet, TMovingPointSet, TDistanceMap>::Get
return measure;
}

template <typename TFixedPointSet, typename TMovingPointSet, typename TDistanceMap>
void
EuclideanDistancePointMetric<TFixedPointSet, TMovingPointSet, TDistanceMap>::GetDerivative(
const TransformParametersType & itkNotUsed(parameters),
DerivativeType & itkNotUsed(derivative)) const
{}

template <typename TFixedPointSet, typename TMovingPointSet, typename TDistanceMap>
void
EuclideanDistancePointMetric<TFixedPointSet, TMovingPointSet, TDistanceMap>::GetValueAndDerivative(
Expand Down

0 comments on commit 1ff5932

Please sign in to comment.