summaryrefslogtreecommitdiffstats
path: root/src/ceph_mon.cc
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2020-07-29 12:17:23 +0200
committerKefu Chai <kchai@redhat.com>2020-08-01 18:01:47 +0200
commit502013affbec9ccfc011a45c4b2bef821a19a302 (patch)
tree7309d0551e557c0a1271aaa0aba8cef0bdab052b /src/ceph_mon.cc
parentcommon/config: extract get_conffile_paths() out (diff)
downloadceph-502013affbec9ccfc011a45c4b2bef821a19a302.tar.xz
ceph-502013affbec9ccfc011a45c4b2bef821a19a302.zip
common: let get_my_sections() return the section names
instead of passing the output parameter just let it return the section names. C++17 enfoces the copy elision in this case, so no need to pass the output parameter for saving the overhead of creating an temporary object and copying it. Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/ceph_mon.cc')
-rw-r--r--src/ceph_mon.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index 3bd219f1107..25c641e9ad3 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -738,8 +738,7 @@ int main(int argc, const char **argv)
ipaddrs = monmap.get_addrs(g_conf()->name.get_id());
// print helpful warning if the conf file doesn't match
- std::vector <std::string> my_sections;
- g_conf().get_my_sections(my_sections);
+ std::vector<std::string> my_sections = g_conf().get_my_sections();
std::string mon_addr_str;
if (g_conf().get_val_from_conf_file(my_sections, "mon addr",
mon_addr_str, true) == 0) {