diff --git a/libs/libcommon/include/common/LocalDate.h b/libs/libcommon/include/common/LocalDate.h index dc6904ba7e6..088a872d870 100644 --- a/libs/libcommon/include/common/LocalDate.h +++ b/libs/libcommon/include/common/LocalDate.h @@ -89,19 +89,8 @@ public: { } - LocalDate(const LocalDate & x) - { - operator=(x); - } - - LocalDate & operator= (const LocalDate & x) - { - m_year = x.m_year; - m_month = x.m_month; - m_day = x.m_day; - - return *this; - } + LocalDate(const LocalDate &) noexcept = default; + LocalDate & operator= (const LocalDate &) noexcept = default; LocalDate & operator= (time_t time) { diff --git a/libs/libcommon/include/common/LocalDateTime.h b/libs/libcommon/include/common/LocalDateTime.h index 67124385676..8e7534f50b5 100644 --- a/libs/libcommon/include/common/LocalDateTime.h +++ b/libs/libcommon/include/common/LocalDateTime.h @@ -95,22 +95,8 @@ public: init(data, length); } - LocalDateTime(const LocalDateTime & x) - { - operator=(x); - } - - LocalDateTime & operator= (const LocalDateTime & x) - { - m_year = x.m_year; - m_month = x.m_month; - m_day = x.m_day; - m_hour = x.m_hour; - m_minute = x.m_minute; - m_second = x.m_second; - - return *this; - } + LocalDateTime(const LocalDateTime &) noexcept = default; + LocalDateTime & operator= (const LocalDateTime &) noexcept = default; LocalDateTime & operator= (time_t time) { diff --git a/libs/libmysqlxx/include/mysqlxx/Null.h b/libs/libmysqlxx/include/mysqlxx/Null.h index 5750870c348..5043c37ac74 100644 --- a/libs/libmysqlxx/include/mysqlxx/Null.h +++ b/libs/libmysqlxx/include/mysqlxx/Null.h @@ -25,6 +25,7 @@ public: bool is_null; Null() : is_null(true) {} + Null(Null &&) noexcept = default; Null(NullType data) : is_null(true) {} explicit Null(const T & data_) : data(data_), is_null(false) {} @@ -42,8 +43,9 @@ public: return data; } + Null & operator= (Null &&) noexcept = default; + Null & operator= (const Null &) = default; Null & operator= (const T & data_) { is_null = false; data = data_; return *this; } - Null & operator= (const Null & other) { is_null = other.is_null; data = other.data; return *this; } Null & operator= (const NullType other) { is_null = true; data = T(); return *this; } bool isNull() const { return is_null; }