]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Monitor: pass function parameter by reference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 14:13:31 +0000 (15:13 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 14:13:31 +0000 (15:13 +0100)
[src/mon/Monitor.h:619]: (performance) Function parameter 'param_str_map'
  should be passed by reference.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mon/Monitor.cc
src/mon/Monitor.h

index 9ff93df5d124bbc440e0157b5852b85ae34ee866..64e7f3f3fd7cb2f90c1b59d99631b793c9c74645 100644 (file)
@@ -2021,7 +2021,7 @@ const MonCommand *Monitor::_get_moncommand(const string &cmd_prefix,
 
 bool Monitor::_allowed_command(MonSession *s, string &module, string &prefix,
                                const map<string,cmd_vartype>& cmdmap,
-                               const map<string,string> param_str_map,
+                               const map<string,string>& param_str_map,
                                const MonCommand *this_cmd) {
 
   bool cmd_r = (this_cmd->req_perms.find('r') != string::npos);
index d7a165f88793898a1bd19a62cae8730ecd6fac09..30f117d90886e1ef93ce3e6e83c6a318f170f548 100644 (file)
@@ -616,7 +616,7 @@ public:
                                            MonCommand *cmds, int cmds_size);
   bool _allowed_command(MonSession *s, string &module, string &prefix,
                         const map<string,cmd_vartype>& cmdmap,
-                        const map<string,string> param_str_map,
+                        const map<string,string>& param_str_map,
                         const MonCommand *this_cmd);
   void _mon_status(Formatter *f, ostream& ss);
   void _quorum_status(Formatter *f, ostream& ss);