Skip to content

Commit

Permalink
STYLE: Use ITK_DEFAULT_COPY_AND_MOVE for exceptions of Image and Mesh IO
Browse files Browse the repository at this point in the history
Follow-up to pull request InsightSoftwareConsortium#4639
commit d1ebdfa
"COMP: Fix implicit copy constructor definition deprecation warnings"
by Jon Haitz Legarreta Gorroño
  • Loading branch information
N-Dekker committed May 8, 2024
1 parent a67a566 commit 2558ea1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 28 deletions.
9 changes: 2 additions & 7 deletions Modules/IO/ImageBase/include/itkImageFileReaderException.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ namespace itk
class ITKIOImageBase_EXPORT ImageFileReaderException : public ExceptionObject
{
public:
ITK_DEFAULT_COPY_AND_MOVE(ImageFileReaderException);

/** \see LightObject::GetNameOfClass() */
itkOverrideGetNameOfClassMacro(ImageFileReaderException);

Expand All @@ -52,13 +54,6 @@ class ITKIOImageBase_EXPORT ImageFileReaderException : public ExceptionObject

/** Has to have empty throw(). */
~ImageFileReaderException() noexcept override;

ImageFileReaderException(const ImageFileReaderException &) = default;
ImageFileReaderException(ImageFileReaderException &&) = default;
ImageFileReaderException &
operator=(const ImageFileReaderException &) = default;
ImageFileReaderException &
operator=(ImageFileReaderException &&) = default;
};
} // namespace itk
#endif // itkImageFileReaderException_h
9 changes: 2 additions & 7 deletions Modules/IO/ImageBase/include/itkImageFileWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ namespace itk
class ITKIOImageBase_EXPORT ImageFileWriterException : public ExceptionObject
{
public:
ITK_DEFAULT_COPY_AND_MOVE(ImageFileWriterException);

/** \see LightObject::GetNameOfClass() */
itkOverrideGetNameOfClassMacro(ImageFileWriterException);

Expand All @@ -55,13 +57,6 @@ class ITKIOImageBase_EXPORT ImageFileWriterException : public ExceptionObject

/** Has to have empty throw(). */
~ImageFileWriterException() noexcept override;

ImageFileWriterException(const ImageFileWriterException &) = default;
ImageFileWriterException(ImageFileWriterException &&) = default;
ImageFileWriterException &
operator=(const ImageFileWriterException &) = default;
ImageFileWriterException &
operator=(ImageFileWriterException &&) = default;
};

/** \class ImageFileWriter
Expand Down
9 changes: 2 additions & 7 deletions Modules/IO/MeshBase/include/itkMeshFileReaderException.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace itk
class ITKIOMeshBase_EXPORT MeshFileReaderException : public ExceptionObject
{
public:
ITK_DEFAULT_COPY_AND_MOVE(MeshFileReaderException);

/** Has to have empty throw(). */
~MeshFileReaderException() noexcept override;

Expand All @@ -49,13 +51,6 @@ class ITKIOMeshBase_EXPORT MeshFileReaderException : public ExceptionObject
unsigned int line,
const char * message = "Error in IO",
const char * loc = "Unknown");

MeshFileReaderException(const MeshFileReaderException &) = default;
MeshFileReaderException(MeshFileReaderException &&) = default;
MeshFileReaderException &
operator=(const MeshFileReaderException &) = default;
MeshFileReaderException &
operator=(MeshFileReaderException &&) = default;
};
} // end namespace itk

Expand Down
9 changes: 2 additions & 7 deletions Modules/IO/MeshBase/include/itkMeshFileWriterException.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace itk
class ITKIOMeshBase_EXPORT MeshFileWriterException : public ExceptionObject
{
public:
ITK_DEFAULT_COPY_AND_MOVE(MeshFileWriterException);

/** Has to have empty throw(). */
~MeshFileWriterException() noexcept override;

Expand All @@ -49,13 +51,6 @@ class ITKIOMeshBase_EXPORT MeshFileWriterException : public ExceptionObject
unsigned int line,
const char * message = "Error in IO",
const char * loc = "Unknown");

MeshFileWriterException(const MeshFileWriterException &) = default;
MeshFileWriterException(MeshFileWriterException &&) = default;
MeshFileWriterException &
operator=(const MeshFileWriterException &) = default;
MeshFileWriterException &
operator=(MeshFileWriterException &&) = default;
};
} // end namespace itk

Expand Down

0 comments on commit 2558ea1

Please sign in to comment.