From c120a4e37f8d13f0e2540e2534bd7cc36e1f1950 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Mon, 12 Apr 2010 18:22:44 -0500 Subject: Make irc::string faster and less wasteful Change irc::string from an std::basic_string typedef to a wrapper around an std::string, to avoid unneeded copies in assign(). --- src/modules/m_spanningtree/server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree/server.cpp') diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 82777845e..fa3115ada 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -93,7 +93,7 @@ bool TreeSocket::Outbound_Reply_Server(parameterlist ¶ms) return false; } - irc::string servername = params[0].c_str(); + std::string servername = params[0]; std::string sname = params[0]; std::string password = params[1]; std::string sid = params[3]; @@ -138,7 +138,7 @@ bool TreeSocket::Outbound_Reply_Server(parameterlist ¶ms) if (CheckDupe) { this->SendError("Server ID "+sid+" already exists on the network! You may want to specify the server ID for the server manually with so they do not conflict."); - ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+assign(servername)+"\2 being introduced denied, server ID already exists on the network. Closing link."); + ServerInstance->SNO->WriteToSnoMask('l',"Server \2"+servername+"\2 being introduced denied, server ID already exists on the network. Closing link."); return false; } @@ -185,7 +185,7 @@ bool TreeSocket::Inbound_Server(parameterlist ¶ms) return false; } - irc::string servername = params[0].c_str(); + std::string servername = params[0]; std::string sname = params[0]; std::string password = params[1]; std::string sid = params[3]; -- cgit v1.3.1-10-gc9f91