summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-27 18:22:12 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-27 18:22:12 +0200
commitdb74ec5d64480cce9fb8aab1875ef9ff6643ac43 (patch)
tree01a5c2f23262b0f5e153d88f0c1df017ae78a910
parentab9c42107fb1c1dcc013d3269270b1900d752b96 (diff)
m_spanningtree Don't pointlessly copy strings in SERVER handlers
-rw-r--r--src/modules/m_spanningtree/server.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp
index 8686b43e5..017b9ddb3 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -33,11 +33,11 @@
*/
CmdResult CommandServer::HandleServer(TreeServer* ParentOfThis, std::vector<std::string>& params)
{
- std::string servername = params[0];
+ const std::string& servername = params[0];
// password is not used for a remote server
// hopcount is not used (ever)
- std::string sid = params[3];
- std::string description = params[4];
+ const std::string& sid = params[3];
+ const std::string& description = params.back();
TreeSocket* socket = ParentOfThis->GetSocket();
if (!InspIRCd::IsSID(sid))
@@ -79,10 +79,10 @@ Link* TreeSocket::AuthRemote(const parameterlist& params)
}
irc::string servername = params[0].c_str();
- std::string sname = params[0];
- std::string password = params[1];
- std::string sid = params[3];
- std::string description = params[4];
+ const std::string& sname = params[0];
+ const std::string& password = params[1];
+ const std::string& sid = params[3];
+ const std::string& description = params.back();
this->SendCapabilities(2);