From 5daaf4ad78c03c7f9a7a1e18ac1e4353b4841f0a Mon Sep 17 00:00:00 2001 From: Jon Haitz Legarreta Date: Sat, 14 Apr 2018 19:20:59 +0200 Subject: [PATCH] COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section. Move `ITK_DISALLOW_COPY_AND_ASSIGN` calls to public section following the discussion in https://discourse.itk.org/t/noncopyable If legacy (pre-macro) copy and assing methods existed, subsitute them for the `ITK_DISALLOW_COPY_AND_ASSIGN` macro. --- include/itkLabelImageGenericInterpolateImageFunction.h | 5 ++--- include/itkLabelSelectionImageAdaptor.h | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/itkLabelImageGenericInterpolateImageFunction.h b/include/itkLabelImageGenericInterpolateImageFunction.h index 2e7fba2..22d66b4 100644 --- a/include/itkLabelImageGenericInterpolateImageFunction.h +++ b/include/itkLabelImageGenericInterpolateImageFunction.h @@ -42,6 +42,8 @@ class ITK_EXPORT LabelImageGenericInterpolateImageFunction : public InterpolateImageFunction { public: + ITK_DISALLOW_COPY_AND_ASSIGN(LabelImageGenericInterpolateImageFunction); + /** Standard class type alias. */ using Self = LabelImageGenericInterpolateImageFunction; using Superclass = InterpolateImageFunction; @@ -99,9 +101,6 @@ class ITK_EXPORT LabelImageGenericInterpolateImageFunction : LabelSetType m_Labels; private: - LabelImageGenericInterpolateImageFunction( const Self& ); //purposely not implemented - void operator=( const Self& ); //purposely not implemented - /** * Evaluate function value at the given index */ diff --git a/include/itkLabelSelectionImageAdaptor.h b/include/itkLabelSelectionImageAdaptor.h index 6cd22d6..61f25e0 100644 --- a/include/itkLabelSelectionImageAdaptor.h +++ b/include/itkLabelSelectionImageAdaptor.h @@ -40,6 +40,8 @@ class ITK_EXPORT LabelSelectionImageAdaptor:public TOutputPixelType > > { public: + ITK_DISALLOW_COPY_AND_ASSIGN(LabelSelectionImageAdaptor); + /** Standard class type alias. */ using Self = LabelSelectionImageAdaptor; using Superclass = ImageAdaptor< TImage, Accessor::LabelSelectionPixelAccessor< @@ -62,10 +64,6 @@ class ITK_EXPORT LabelSelectionImageAdaptor:public protected: LabelSelectionImageAdaptor() {} ~LabelSelectionImageAdaptor() override {} - -private: - LabelSelectionImageAdaptor(const Self &); //purposely not implemented - void operator=(const Self &); //purposely not implemented }; } // end namespace itk