From: Danny Al-Gaaf Date: Wed, 19 Feb 2014 14:13:31 +0000 (+0100) Subject: Monitor: pass function parameter by reference X-Git-Tag: v0.78~138^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d1392ddeeff10272a3e426e859b39152200f808;p=ceph.git Monitor: pass function parameter by reference [src/mon/Monitor.h:619]: (performance) Function parameter 'param_str_map' should be passed by reference. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 9ff93df5d124..64e7f3f3fd7c 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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& cmdmap, - const map param_str_map, + const map& param_str_map, const MonCommand *this_cmd) { bool cmd_r = (this_cmd->req_perms.find('r') != string::npos); diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index d7a165f88793..30f117d90886 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -616,7 +616,7 @@ public: MonCommand *cmds, int cmds_size); bool _allowed_command(MonSession *s, string &module, string &prefix, const map& cmdmap, - const map param_str_map, + const map& param_str_map, const MonCommand *this_cmd); void _mon_status(Formatter *f, ostream& ss); void _quorum_status(Formatter *f, ostream& ss);