Skip to content

Commit

Permalink
STYLE: Default copy and move of ImageIterator
Browse files Browse the repository at this point in the history
Using `ITK_DEFAULT_COPY_AND_MOVE`.
  • Loading branch information
N-Dekker authored and hjmjohnson committed Jun 14, 2024
1 parent 5369fc4 commit a883981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
11 changes: 2 additions & 9 deletions Modules/Core/Common/include/itkImageIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ template <typename TImage>
class ITK_TEMPLATE_EXPORT ImageIterator : public ImageConstIterator<TImage>
{
public:
ITK_DEFAULT_COPY_AND_MOVE(ImageIterator);

/** Standard class type aliases. */
using Self = ImageIterator;

Expand Down Expand Up @@ -96,19 +98,10 @@ class ITK_TEMPLATE_EXPORT ImageIterator : public ImageConstIterator<TImage>
/** Default Destructor */
~ImageIterator() override = default;

/** Copy Constructor. The copy constructor is provided to make sure the
* handle to the image is properly reference counted. */
ImageIterator(const Self & it);

/** Constructor establishes an iterator to walk a particular image and a
* particular region of that image. */
ImageIterator(TImage * ptr, const RegionType & region);

/** operator= is provided to make sure the handle to the image is properly
* reference counted. */
Self &
operator=(const Self & it);

/** Set the pixel value */
void
Set(const PixelType & value) const
Expand Down
19 changes: 0 additions & 19 deletions Modules/Core/Common/include/itkImageIterator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@
namespace itk
{

//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
template <typename TImage>
ImageIterator<TImage>::ImageIterator(const Self & it)
: ImageConstIterator<TImage>(it)
{}

//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
Expand Down Expand Up @@ -57,17 +49,6 @@ ImageIterator<TImage>::operator=(const ImageConstIterator<TImage> & it)
return *this;
}

//----------------------------------------------------------------------
// Assignment Operator
//----------------------------------------------------------------------
template <typename TImage>
ImageIterator<TImage> &
ImageIterator<TImage>::operator=(const Self & it)
{
this->ImageConstIterator<TImage>::operator=(it);
return *this;
}

} // end namespace itk

#endif

0 comments on commit a883981

Please sign in to comment.