Browse Source

[2768] Don't use const reference

It should be allowed by C++ standard (and the object be alive before the
function is left), but this is just to be sure.
Michal 'vorner' Vaner 12 years ago
parent
commit
8bab20ff23
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/config/ccsession.cc

+ 1 - 1
src/lib/config/ccsession.cc

@@ -862,7 +862,7 @@ ModuleCCSession::rpcCall(const std::string &command, const std::string &group,
                          const std::string &instance, const std::string &to,
                          const ConstElementPtr &params)
 {
-    const ConstElementPtr &command_el(createCommand(command, params));
+    ConstElementPtr command_el(createCommand(command, params));
     const int seq = groupSendMsg(command_el, group, instance, to, true);
     ConstElementPtr env, answer;
     LOG_DEBUG(config_logger, DBGLVL_TRACE_DETAIL, CONFIG_RPC_SEQ).arg(command).