]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Fri, 15 Jul 2022 19:42:40 +0000 (15:42 -0400)
`unique_ptr` overload should take by reference.

Both should be const.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_sal.h

index 586eba096737c3d61742f1798173dd5ff785503e..fdfbb26b3fde17b83d86fa929b77798a392dd5f4 100644 (file)
@@ -745,9 +745,9 @@ class Bucket {
     virtual bool versioning_enabled() = 0;
 
     /** 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(std::unique_ptr<Bucket> b) { return (!b || b->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;