Skip to content

Commit

Permalink
COMP: Use and move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
Browse files Browse the repository at this point in the history
Use the `ITK_DISALLOW_COPY_AND_ASSIGN` macro to enhance consistency across
the the toolkit when disallowing the copy constructor and the assign
operator.

Move the `ITK_DISALLOW_COPY_AND_ASSIGN` calls to public section following
the discussion in
https://discourse.itk.org/t/itk-disallow-copy-and-assign/648
  • Loading branch information
jhlegarreta committed Mar 17, 2019
1 parent c282b21 commit 77d7f2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/itkMetamorphosisImageRegistrationMethodv4.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class MetamorphosisImageRegistrationMethodv4:
public TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingImage, TimeVaryingVelocityFieldSemiLagrangianTransform<double, TFixedImage::ImageDimension> >
{
public:
DISALLOW_COPY_AND_ASSIGN(MetamorphosisImageRegistrationMethodv4);

/** Standard class type alias. */
using Self = MetamorphosisImageRegistrationMethodv4;
using Superclass = TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingImage, TimeVaryingVelocityFieldSemiLagrangianTransform<double, TFixedImage::ImageDimension> >;
Expand Down Expand Up @@ -230,8 +232,6 @@ public TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingIma
void PrintSelf(std::ostream& os, Indent indent) const override;

private:
MetamorphosisImageRegistrationMethodv4(const Self&); // Intentionally not implemened
void operator=(const Self&); //Intentionally not implemented

double m_Scale;
double m_RegistrationSmoothness;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter :
public TimeVaryingVelocityFieldIntegrationImageFilter<TTimeVaryingVelocityField, TDisplacementField>
{
public:
DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter);

using Self = TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter;
using Superclass = TimeVaryingVelocityFieldIntegrationImageFilter
<TTimeVaryingVelocityField, TDisplacementField>;
Expand Down Expand Up @@ -111,8 +113,6 @@ class TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter :
DisplacementFieldExtrapolatorPointer m_DisplacementFieldExtrapolator;

private:
TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter( const Self & ) ITK_DELETE_FUNCTION;
void operator=( const Self & ) ITK_DELETE_FUNCTION;

VelocityFieldInterpolatorPointer m_VelocityFieldInterpolator;
VelocityFieldExtrapolatorPointer m_VelocityFieldExtrapolator;
Expand Down
5 changes: 3 additions & 2 deletions include/itkTimeVaryingVelocityFieldSemiLagrangianTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class TimeVaryingVelocityFieldSemiLagrangianTransform :
public TimeVaryingVelocityFieldTransform<TParametersValueType, NDimensions>
{
public:
DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldSemiLagrangianTransform);

/** Standard class type alias. */
using Self = TimeVaryingVelocityFieldSemiLagrangianTransform;
using Superclass = TimeVaryingVelocityFieldTransform<TParametersValueType, NDimensions>;
Expand Down Expand Up @@ -87,8 +89,7 @@ class TimeVaryingVelocityFieldSemiLagrangianTransform :
virtual ~TimeVaryingVelocityFieldSemiLagrangianTransform(){};

private:
TimeVaryingVelocityFieldSemiLagrangianTransform( const Self& ) ITK_DELETE_FUNCTION;
void operator=( const Self& ) ITK_DELETE_FUNCTION;

bool m_UseInverse;
};

Expand Down
4 changes: 2 additions & 2 deletions include/itkWrapExtrapolateImageFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class WrapExtrapolateImageFunction:
public ExtrapolateImageFunction< TInputImage, TCoordRep >
{
public:
DISALLOW_COPY_AND_ASSIGN(WrapExtrapolateImageFunction);

/** Standard class type alias. */
using Self = WrapExtrapolateImageFunction;
using Superclass = ExtrapolateImageFunction< TInputImage, TCoordRep >;
Expand Down Expand Up @@ -163,8 +165,6 @@ class WrapExtrapolateImageFunction:
}

private:
WrapExtrapolateImageFunction(const Self &) ITK_DELETE_FUNCTION;
void operator=(const Self &) ITK_DELETE_FUNCTION;

InterpolatorPointerType m_Interpolator;
};
Expand Down

0 comments on commit 77d7f2a

Please sign in to comment.