From bd6adff9a59d3dc61de77ca54094a7e16ae548be Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 13 Dec 2017 00:59:53 -0800 Subject: C++: implement missing copy operator It's good practice to implement the copy operator, even if not needed at the moment. Signed-off-by: Patrick Ohly --- src/dbus/server/pim/folks.h | 6 ++++++ src/gdbusxx/gdbus-cxx-bridge.h | 7 +++++++ src/syncevo/util.h | 1 + 3 files changed, 14 insertions(+) diff --git a/src/dbus/server/pim/folks.h b/src/dbus/server/pim/folks.h index bf2f9dcf..83483f5c 100644 --- a/src/dbus/server/pim/folks.h +++ b/src/dbus/server/pim/folks.h @@ -146,6 +146,12 @@ class IndividualDataCompare : public std::binary_functioncompare(a.m_criteria, b.m_criteria); } + + IndividualDataCompare & operator = (const IndividualDataCompare &other) + { + m_compare = other.m_compare; + return *this; + } }; /** diff --git a/src/gdbusxx/gdbus-cxx-bridge.h b/src/gdbusxx/gdbus-cxx-bridge.h index 131478ba..9eeefc9f 100644 --- a/src/gdbusxx/gdbus-cxx-bridge.h +++ b/src/gdbusxx/gdbus-cxx-bridge.h @@ -197,6 +197,13 @@ class DBusConnectionPtr : public boost::intrusive_ptr m_name(other.m_name) {} + DBusConnectionPtr & operator = (const DBusConnectionPtr &other) + { + *static_cast *>(this) = static_cast &>(other); + m_name = other.m_name; + return *this; + } + GDBusConnection *reference(void) throw() { GDBusConnection *conn = get(); diff --git a/src/syncevo/util.h b/src/syncevo/util.h index 20a8a452..41207f96 100644 --- a/src/syncevo/util.h +++ b/src/syncevo/util.h @@ -363,6 +363,7 @@ template class Init { Init() : m_value(boost::value_initialized()) {} Init(const Init &other) : m_value(other.m_value) {} Init & operator = (const T &val) { m_value = val; return *this; } + Init & operator = (const Init &other) { m_value = other.m_value; return *this; } operator const T & () const { return m_value; } operator T & () { return m_value; } private: -- cgit v1.2.3