Skip to content

Commit

Permalink
STYLE: Use ITK_DEFAULT_COPY_AND_MOVE for RealTimeStamp and Region
Browse files Browse the repository at this point in the history
Instead of "manually" defaulting their copy and move member functions.

Follow-up to two commits by Jon Haitz Legarreta Gorroño:

pull request InsightSoftwareConsortium#4626
commit 9aff210
"COMP: Use default copy, move for construc, assign `RealTimeStamp`"

pull request InsightSoftwareConsortium#4627
commit ec2677f
"COMP: Use `default` copy and move construct and assign in `itk::Region`"
  • Loading branch information
N-Dekker authored and hjmjohnson committed May 15, 2024
1 parent 16e6475 commit 4f42280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions Modules/Core/Common/include/itkRealTimeStamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ namespace itk
class ITKCommon_EXPORT RealTimeStamp
{
public:
ITK_DEFAULT_COPY_AND_MOVE(RealTimeStamp);

using Self = RealTimeStamp;

friend class RealTimeClock;
Expand All @@ -55,13 +57,6 @@ class ITKCommon_EXPORT RealTimeStamp
/** Destructor */
~RealTimeStamp();

RealTimeStamp(const RealTimeStamp &) = default;
RealTimeStamp &
operator=(const RealTimeStamp &) = default;
RealTimeStamp(RealTimeStamp &&) = default;
RealTimeStamp &
operator=(RealTimeStamp &&) = default;

/** Native type used to represent the time in different time units. */
using TimeRepresentationType = RealTimeInterval::TimeRepresentationType;

Expand Down
9 changes: 2 additions & 7 deletions Modules/Core/Common/include/itkRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ namespace itk
class ITKCommon_EXPORT Region
{
public:
ITK_DEFAULT_COPY_AND_MOVE(Region);

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

Expand All @@ -90,13 +92,6 @@ class ITKCommon_EXPORT Region
Region() = default;
virtual ~Region() = default;

Region(const Region &) = default;
Region &
operator=(const Region &) = default;
Region(Region &&) = default;
Region &
operator=(Region &&) = default;

protected:
/** Methods invoked by Print() to print information about the object
* including superclasses. Typically not called by the user (use Print()
Expand Down

0 comments on commit 4f42280

Please sign in to comment.