From: Rishabh Dave Date: Wed, 4 Oct 2023 18:22:27 +0000 (+0530) Subject: mon/AuthMonitor: make use of imported namespace symbols X-Git-Tag: v19.0.0~306^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8545784a982f76bb5694704b700910813fc5ee56;p=ceph-ci.git mon/AuthMonitor: make use of imported namespace symbols Once a symbol has been imported into the current namespace, no need to mention the original namespace while using it. IOW, no need to write "std::string" after it has been imported from the namespace "std" into the current namespace. Signed-off-by: Rishabh Dave --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index 6c0763c2ae4..0abbc790f83 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -82,7 +82,7 @@ bool AuthMonitor::check_rotate() } void AuthMonitor::process_used_pending_keys( - const std::map& used_pending_keys) + const map& used_pending_keys) { for (auto& [name, used_key] : used_pending_keys) { dout(10) << __func__ << " used pending_key for " << name << dendl; @@ -1703,7 +1703,7 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op) err = -EINVAL; goto done; } else { - mon_cap_string += " fsname=" + std::string(fs->get_mds_map().get_fs_name()); + mon_cap_string += " fsname=" + string(fs->get_mds_map().get_fs_name()); } } @@ -1745,7 +1745,7 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op) mds_cap_string += "allow " + cap; if (filesystem != "*" && filesystem != "all" && fs != nullptr) { - mds_cap_string += " fsname=" + std::string(fs->get_mds_map().get_fs_name()); + mds_cap_string += " fsname=" + string(fs->get_mds_map().get_fs_name()); } if (path != "/") { @@ -2068,7 +2068,7 @@ bool AuthMonitor::_upgrade_format_to_dumpling() // set daemon profiles if ((p->first.is_osd() || p->first.is_mds()) && mon_caps == "allow rwx") { - new_caps = string("allow profile ") + std::string(p->first.get_type_name()); + new_caps = string("allow profile ") + string(p->first.get_type_name()); } // update bootstrap keys