From 8b7947debc41dea83f8bd6304ac6ecf82ca6ae10 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 3 Oct 2023 15:25:04 -0400 Subject: [PATCH] rgw: add rgw_bucket() ctor for tenant+name this avoids the need to construct a temporary rgw_bucket_key just to construct a rgw_bucket without an instance id Signed-off-by: Casey Bodley --- src/rgw/rgw_bucket_types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_bucket_types.h b/src/rgw/rgw_bucket_types.h index 52ac5dc34bd..ea379678ebe 100644 --- a/src/rgw/rgw_bucket_types.h +++ b/src/rgw/rgw_bucket_types.h @@ -61,6 +61,9 @@ struct rgw_bucket { const std::string& _bucket_id) : tenant(_tenant), name(_name), bucket_id(_bucket_id) {} + rgw_bucket(const std::string& _tenant, + const std::string& _name) + : tenant(_tenant), name(_name) {} rgw_bucket(const rgw_bucket_key& bk) : tenant(bk.tenant), name(bk.name), bucket_id(bk.bucket_id) {} -- 2.39.5