From 275546cff7d1dbc4097c0a5df6f4472651cd351a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 30 Apr 2019 18:34:27 +0200 Subject: Removed our version of ACE_Time_Value::operator=, the compiler generated one will be enough. When we have C++11 we declare copy constructor and assignment operators as default, fixes warnings with gcc9 * ACE/ace/Time_Value.h: * ACE/ace/Time_Value.inl: --- ACE/ace/Time_Value.h | 8 +++++++- ACE/ace/Time_Value.inl | 9 --------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h index 7b67867ee23..f985f69e807 100644 --- a/ACE/ace/Time_Value.h +++ b/ACE/ace/Time_Value.h @@ -84,6 +84,9 @@ public: explicit ACE_Time_Value (const timespec_t &t); #if defined (ACE_HAS_CPP11) + ACE_Time_Value (const ACE_Time_Value&) = default; + ACE_Time_Value (ACE_Time_Value&&) = default; + /// Construct the ACE_Time_Value object from a chrono duration. template< class Rep, class Period > explicit ACE_Time_Value (const std::chrono::duration& duration) @@ -264,8 +267,11 @@ public: /// Add @a tv to this. ACE_Time_Value &operator += (time_t tv); +#if defined (ACE_HAS_CPP11) /// Assign @a tv to this - ACE_Time_Value &operator = (const ACE_Time_Value &tv); + ACE_Time_Value &operator = (const ACE_Time_Value &) = default; + ACE_Time_Value &operator = (ACE_Time_Value &&) = default; +#endif /* ACE_HAS_CPP11) /// Assign @a tv to this ACE_Time_Value &operator = (time_t tv); diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl index 98459b47713..581e348657b 100644 --- a/ACE/ace/Time_Value.inl +++ b/ACE/ace/Time_Value.inl @@ -343,15 +343,6 @@ ACE_Time_Value::operator+= (time_t tv) return *this; } -ACE_INLINE ACE_Time_Value & -ACE_Time_Value::operator= (const ACE_Time_Value &tv) -{ - // ACE_OS_TRACE ("ACE_Time_Value::operator="); - this->sec (tv.sec ()); - this->usec (tv.usec ()); - return *this; -} - ACE_INLINE ACE_Time_Value & ACE_Time_Value::operator= (time_t tv) { -- cgit v1.2.1