From: Sage Weil Date: Sun, 18 Feb 2018 20:36:28 +0000 (-0600) Subject: common/tracked_int_ptr: fix operator= return value X-Git-Tag: v13.1.0~390^2~53 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=183e7d7bc2b1eceaf23c390eff4757db625a6284;p=ceph-ci.git common/tracked_int_ptr: fix operator= return value Signed-off-by: Sage Weil --- diff --git a/src/common/tracked_int_ptr.hpp b/src/common/tracked_int_ptr.hpp index 5752906b18c..d797e01a3ff 100644 --- a/src/common/tracked_int_ptr.hpp +++ b/src/common/tracked_int_ptr.hpp @@ -40,9 +40,10 @@ public: TrackedIntPtr(const TrackedIntPtr &rhs) : ptr(rhs.ptr), id(ptr ? get_with_id(ptr) : 0) {} - void operator=(const TrackedIntPtr &rhs) { + TrackedIntPtr& operator=(const TrackedIntPtr &rhs) { TrackedIntPtr o(rhs.ptr); swap(o); + return *this; } T &operator*() const { return *ptr;