From: Adam C. Emerson Date: Mon, 11 Jul 2022 15:52:09 +0000 (-0400) Subject: rgw: Fix `rgw::sal::Bucket::empty` static method signatures X-Git-Tag: v18.0.0~496^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b1d3e6c00674ebf6bde08968789a426d65db73d9;p=ceph.git rgw: Fix `rgw::sal::Bucket::empty` static method signatures `unique_ptr` overload should take by reference. Both should be const. Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h index 586eba096737..fdfbb26b3fde 100644 --- a/src/rgw/rgw_sal.h +++ b/src/rgw/rgw_sal.h @@ -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 b) { return (!b || b->empty()); } + static bool empty(const std::unique_ptr& b) { return (!b || b->empty()); } /** Clone a copy of this bucket. Used when modification is necessary of the copy */ virtual std::unique_ptr clone() = 0;