]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix `rgw::sal::Bucket::empty` static method signatures
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 11 Jul 2022 15:52:09 +0000 (11:52 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 20 Jul 2022 18:30:38 +0000 (14:30 -0400)
`unique_ptr` overload should take by reference.

Both should be const.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit b1d3e6c00674ebf6bde08968789a426d65db73d9)

Conflicts:
src/rgw/rgw_sal.h
 - `unique_ptr` overload of empty

Fixes: https://tracker.ceph.com/issues/56586
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_sal.h

index 74c15ecdddd3f903adab8cb51852ceae9feedc70..fcf015e0a5b40a5a24da121d897621edb5d0554a 100644 (file)
@@ -280,7 +280,11 @@ class RGWBucket {
       ent.convert(b);
     }
 
-    static bool empty(RGWBucket* b) { return (!b || b->empty()); }
+    /** Check if a Bucket pointer is empty */
+    static bool empty(const RGWBucket* b) { return (!b || b->empty()); }
+    /** Check if a Bucket unique pointer is empty */
+    static bool empty(const std::unique_ptr<RGWBucket>& b) { return (!b || b->empty()); }
+
     virtual std::unique_ptr<RGWBucket> clone() = 0;
 
     /* dang - This is temporary, until the API is completed */