diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-08 14:49:18 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-08-25 01:49:32 +0200 |
commit | 2879d35dcbdcb2c583e08b591874869b4daaca4e (patch) | |
tree | 048717d212a70667dbb1b93aec60856d9a47f6f4 | |
parent | cf01674e07484b90be41f0fb84dc18d7888284fc (diff) |
Remove unnecessary string copy in XLineManager::InvokeStats
-rw-r--r-- | src/xline.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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; } } |