From 95c6c2d209a877b934e05e727a181de8c68accd3 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 11 Jul 2022 11:52:09 -0400 Subject: [PATCH] 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 (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 --- src/rgw/rgw_sal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h index 74c15ecdddd3f..fcf015e0a5b40 100644 --- a/src/rgw/rgw_sal.h +++ b/src/rgw/rgw_sal.h @@ -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& b) { return (!b || b->empty()); } + virtual std::unique_ptr clone() = 0; /* dang - This is temporary, until the API is completed */ -- 2.39.5