Skip to content

Commit

Permalink
STYLE: Default copy and move of ImageIteratorWithIndex
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 a883981 commit f7f9bd6
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/itkImageIteratorWithIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ template <typename TImage>
class ITK_TEMPLATE_EXPORT ImageIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
{
public:
ITK_DEFAULT_COPY_AND_MOVE(ImageIteratorWithIndex);

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

Expand Down Expand Up @@ -99,19 +101,10 @@ class ITK_TEMPLATE_EXPORT ImageIteratorWithIndex : public ImageConstIteratorWith
/** Default Destructor */
~ImageIteratorWithIndex() override = default;

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

/** Constructor establishes an iterator to walk a particular image and a
* particular region of that image. */
ImageIteratorWithIndex(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/itkImageIteratorWithIndex.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@
namespace itk
{

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

//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
Expand Down Expand Up @@ -57,17 +49,6 @@ ImageIteratorWithIndex<TImage>::operator=(const ImageConstIteratorWithIndex<TIma
return *this;
}

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

} // end namespace itk

#endif

0 comments on commit f7f9bd6

Please sign in to comment.