]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/tracked_int_ptr: fix operator= return value
authorSage Weil <sage@redhat.com>
Sun, 18 Feb 2018 20:36:28 +0000 (14:36 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:55 +0000 (08:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/tracked_int_ptr.hpp

index 5752906b18cddc038ecff0b82c858d80d16148f7..d797e01a3ff1defc16b1922a028a3a9b480a6e7c 100644 (file)
@@ -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;