From 3f947dab828af3e2f2e6bf8be85fc5c07b6d2ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sun, 17 Mar 2019 12:06:09 -0400 Subject: [PATCH] COMP: Use and move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section. 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 --- include/itkMetamorphosisImageRegistrationMethodv4.h | 8 ++++---- ...ingVelocityFieldSemiLagrangianIntegrationImageFilter.h | 4 ++-- .../itkTimeVaryingVelocityFieldSemiLagrangianTransform.h | 5 +++-- include/itkWrapExtrapolateImageFunction.h | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/itkMetamorphosisImageRegistrationMethodv4.h b/include/itkMetamorphosisImageRegistrationMethodv4.h index e2b9a00..6e8ae35 100644 --- a/include/itkMetamorphosisImageRegistrationMethodv4.h +++ b/include/itkMetamorphosisImageRegistrationMethodv4.h @@ -47,6 +47,8 @@ class ConstantImageFilter: public ImageToImageFilter { public: + ITK_DISALLOW_COPY_AND_ASSIGN(ConstantImageFilter); + /** Standard class type alias. */ using Self = ConstantImageFilter; using Superclass = ImageToImageFilter< TInputImage, TOutputImage >; @@ -84,8 +86,6 @@ public ImageToImageFilter } private: - ConstantImageFilter(const Self &); //purposely not implemented - void operator=(const Self &); //purposely not implemented OutputPixelType m_Constant; }; @@ -104,6 +104,8 @@ class MetamorphosisImageRegistrationMethodv4: public TimeVaryingVelocityFieldImageRegistrationMethodv4 > { public: + ITK_DISALLOW_COPY_AND_ASSIGN(MetamorphosisImageRegistrationMethodv4); + /** Standard class type alias. */ using Self = MetamorphosisImageRegistrationMethodv4; using Superclass = TimeVaryingVelocityFieldImageRegistrationMethodv4 >; @@ -228,8 +230,6 @@ public TimeVaryingVelocityFieldImageRegistrationMethodv4 { public: + ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter); + using Self = TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter; using Superclass = TimeVaryingVelocityFieldIntegrationImageFilter ; @@ -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; diff --git a/include/itkTimeVaryingVelocityFieldSemiLagrangianTransform.h b/include/itkTimeVaryingVelocityFieldSemiLagrangianTransform.h index f22bd6d..187ac33 100644 --- a/include/itkTimeVaryingVelocityFieldSemiLagrangianTransform.h +++ b/include/itkTimeVaryingVelocityFieldSemiLagrangianTransform.h @@ -36,6 +36,8 @@ class TimeVaryingVelocityFieldSemiLagrangianTransform : public TimeVaryingVelocityFieldTransform { public: + ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldSemiLagrangianTransform); + /** Standard class type alias. */ using Self = TimeVaryingVelocityFieldSemiLagrangianTransform; using Superclass = TimeVaryingVelocityFieldTransform; @@ -87,8 +89,7 @@ class TimeVaryingVelocityFieldSemiLagrangianTransform : ~TimeVaryingVelocityFieldSemiLagrangianTransform() override = default; private: - TimeVaryingVelocityFieldSemiLagrangianTransform( const Self& ) ITK_DELETE_FUNCTION; - void operator=( const Self& ) ITK_DELETE_FUNCTION; + bool m_UseInverse; }; diff --git a/include/itkWrapExtrapolateImageFunction.h b/include/itkWrapExtrapolateImageFunction.h index 49ceb86..f1a0235 100644 --- a/include/itkWrapExtrapolateImageFunction.h +++ b/include/itkWrapExtrapolateImageFunction.h @@ -40,6 +40,8 @@ class WrapExtrapolateImageFunction: public ExtrapolateImageFunction< TInputImage, TCoordRep > { public: + ITK_DISALLOW_COPY_AND_ASSIGN(WrapExtrapolateImageFunction); + /** Standard class type alias. */ using Self = WrapExtrapolateImageFunction; using Superclass = ExtrapolateImageFunction< TInputImage, TCoordRep >; @@ -163,8 +165,6 @@ class WrapExtrapolateImageFunction: } private: - WrapExtrapolateImageFunction(const Self &) ITK_DELETE_FUNCTION; - void operator=(const Self &) ITK_DELETE_FUNCTION; InterpolatorPointerType m_Interpolator; };