]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2768] Don't use const reference
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Mar 2013 09:35:46 +0000 (10:35 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Mar 2013 09:35:46 +0000 (10:35 +0100)
It should be allowed by C++ standard (and the object be alive before the
function is left), but this is just to be sure.

src/lib/config/ccsession.cc

index bf250509d5d66a22b358feae429cbc775803064c..c649e270e6c763bc604048731945cd92601adea1 100644 (file)
@@ -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).