Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

STYLE: Move empty const member functions from .hxx to .h #5221

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
{}
Comment on lines +93 to +95
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that EuclideanDistancePointMetric::GetDerivative has always been empty, looking at commit 06e94a2 (10 Oct 2004):

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

Just curious, was it still meant to be implemented? Or was it intentionally left empty?


/** 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