diff options
author | Abhishek Lekshmanan <abhishek@suse.com> | 2020-09-24 12:58:22 +0200 |
---|---|---|
committer | Pritha Srivastava <prsrivas@redhat.com> | 2022-06-06 12:49:42 +0200 |
commit | 0cabcf6b8e810ecd3701129ad399b97a4d14b7e2 (patch) | |
tree | e8b30708ce299247d4ff9fccf579b051589b8646 /src/rgw/rgw_role.cc | |
parent | rgw: implement delete oids (diff) | |
download | ceph-0cabcf6b8e810ecd3701129ad399b97a4d14b7e2.tar.xz ceph-0cabcf6b8e810ecd3701129ad399b97a4d14b7e2.zip |
rgw: split RGWRole into an Info Class containing members
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
Diffstat (limited to 'src/rgw/rgw_role.cc')
-rw-r--r-- | src/rgw/rgw_role.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rgw/rgw_role.cc b/src/rgw/rgw_role.cc index fe028f31597..af7f7f6f8fd 100644 --- a/src/rgw/rgw_role.cc +++ b/src/rgw/rgw_role.cc @@ -107,7 +107,7 @@ int RGWRole::delete_policy(const DoutPrefixProvider* dpp, const string& policy_n } else { perm_policy_map.erase(it); } - return 0; + return 0; } void RGWRole::dump(Formatter *f) const @@ -176,12 +176,11 @@ bool RGWRole::validate_input(const DoutPrefixProvider* dpp) return true; } -void RGWRole::extract_name_tenant(const std::string& str) -{ - size_t pos = str.find('$'); - if (pos != std::string::npos) { +void RGWRole::extract_name_tenant(const std::string& str) { + if (auto pos = str.find('$'); + pos != std::string::npos) { tenant = str.substr(0, pos); - name = str.substr(pos + 1); + name = str.substr(pos+1); } } |