diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2019-04-30 18:34:27 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2019-04-30 18:34:27 +0200 |
commit | 275546cff7d1dbc4097c0a5df6f4472651cd351a (patch) | |
tree | 3c7cb59b3f6b1447b1ce37f4f2d782d03ff6e6c3 | |
parent | e4e6b0cf6be0691e7579e16176cc0ec9e4f09628 (diff) | |
download | ATCD-275546cff7d1dbc4097c0a5df6f4472651cd351a.tar.gz |
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:
-rw-r--r-- | ACE/ace/Time_Value.h | 8 | ||||
-rw-r--r-- | 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<Rep, Period>& 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 @@ -344,15 +344,6 @@ ACE_Time_Value::operator+= (time_t tv) } 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) { // ACE_OS_TRACE ("ACE_Time_Value::operator="); |