From 2879d35dcbdcb2c583e08b591874869b4daaca4e Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 8 Jul 2012 14:49:18 +0200 Subject: Remove unnecessary string copy in XLineManager::InvokeStats --- src/xline.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/xline.cpp') diff --git a/src/xline.cpp b/src/xline.cpp index 397b937ec..720dbcc50 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -447,8 +447,6 @@ void XLineManager::ApplyLines() void XLineManager::InvokeStats(const std::string &type, int numeric, User* user, string_list &results) { - std::string sn = ServerInstance->Config->ServerName; - ContainerIter n = lookup_lines.find(type); time_t current = ServerInstance->Time(); @@ -468,8 +466,8 @@ void XLineManager::InvokeStats(const std::string &type, int numeric, User* user, ExpireLine(n, i); } else - results.push_back(sn+" "+ConvToStr(numeric)+" "+user->nick+" :"+i->second->Displayable()+" "+ - ConvToStr(i->second->set_time)+" "+ConvToStr(i->second->duration)+" "+std::string(i->second->source)+" :"+(i->second->reason)); + results.push_back(ServerInstance->Config->ServerName+" "+ConvToStr(numeric)+" "+user->nick+" :"+i->second->Displayable()+" "+ + ConvToStr(i->second->set_time)+" "+ConvToStr(i->second->duration)+" "+i->second->source+" :"+i->second->reason); i = safei; } } -- cgit v1.2.3