]> git.apps.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 16:08:47 +0000 (12:08 -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/56585
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_sal.h

index cc551a43fe91cd09d3918bb8095bdffdd55062d8..9d02cbbfdf501bc914e514f411b6580eb72423e7 100644 (file)
@@ -734,7 +734,9 @@ class Bucket {
     bool versioning_enabled() { return info.versioning_enabled(); }
 
     /** Check if a Bucket pointer is empty */
-    static bool empty(Bucket* b) { return (!b || b->empty()); }
+    static bool empty(const Bucket* b) { return (!b || b->empty()); }
+    /** Check if a Bucket unique pointer is empty */
+    static bool empty(const std::unique_ptr<Bucket>& b) { return (!b || b->empty()); }
     /** Clone a copy of this bucket.  Used when modification is necessary of the copy */
     virtual std::unique_ptr<Bucket> clone() = 0;