Skip to content

Commit

Permalink
COMP: Add missing ITK_OVERRIDE statements
Browse files Browse the repository at this point in the history
When overriding a parent class function from ITK, we need
to use ITK_OVERRIDE to improve long term maintenance challenges
by ensuring that if the parent class API changes, these can be
readily found in the sub-classes.
  • Loading branch information
hjmjohnson committed Oct 25, 2015
1 parent d8492e6 commit ac3dee7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Examples/DenoiseImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CommandProgressUpdate : public itk::Command

public:

void Execute(itk::Object *caller, const itk::EventObject & event)
void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>( caller );
if (! po) return;
Expand All @@ -59,7 +59,7 @@ class CommandProgressUpdate : public itk::Command
}
}

void Execute(const itk::Object * object, const itk::EventObject & event)
void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>(
const_cast<itk::Object *>( object ) );
Expand Down
4 changes: 2 additions & 2 deletions Examples/antsJointFusion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CommandProgressUpdate : public itk::Command

public:

void Execute(itk::Object *caller, const itk::EventObject & event)
void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>( caller );
if (! po) return;
Expand All @@ -59,7 +59,7 @@ class CommandProgressUpdate : public itk::Command
}
}

void Execute(const itk::Object * object, const itk::EventObject & event)
void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>(
const_cast<itk::Object *>( object ) );
Expand Down
4 changes: 2 additions & 2 deletions Examples/antsJointTensorFusion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CommandProgressUpdate : public itk::Command

public:

void Execute(itk::Object *caller, const itk::EventObject & event)
void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>( caller );
if (! po) return;
Expand All @@ -64,7 +64,7 @@ class CommandProgressUpdate : public itk::Command
}
}

void Execute(const itk::Object * object, const itk::EventObject & event)
void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE
{
itk::ProcessObject *po = dynamic_cast<itk::ProcessObject *>(
const_cast<itk::Object *>( object ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class MeanSquaresPointSetToPointSetIntensityMetricv4:
/**
* Prepare point sets for use.
*/
virtual void InitializePointSets() const;
virtual void InitializePointSets() const ITK_OVERRIDE;

/**
* Calculates the local metric value for a single point.
Expand Down
2 changes: 1 addition & 1 deletion Utilities/itkImageIntensityAndGradientToPointSetFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ImageIntensityAndGradientToPointSetFilter
return static_cast<const MaskImageType*>( this->ProcessObject::GetInput( 1 ) );
}

void Update();
void Update() ITK_OVERRIDE;

/**
* Set/Get sigma for the gradient recursive gaussian image filter
Expand Down

0 comments on commit ac3dee7

Please sign in to comment.