From 47dda4f61512f6047f2b1dcccd1943aab74726e3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 10 Jan 2015 15:16:03 +0100 Subject: Reduce std::string::substr() usage substr() returns a new string while erase() and assign() modify the existing one --- src/modules/m_spanningtree/postcommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree/postcommand.cpp') diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index 0695ce632..ae98be946 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -89,7 +89,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, CommandBase* thiscm if (ServerInstance->Modes->FindPrefix(dest[0])) { pfx = dest[0]; - dest = dest.substr(1); + dest.erase(dest.begin()); } if (dest[0] == '#') { -- cgit v1.3.1-10-gc9f91