summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 12:02:35 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 12:02:35 +0000
commit3936814ac6919c7c2dca75fac737a46c30510603 (patch)
treeaad28ad1fad70d119e0a26553f7c796a8d9202b1 /src/inspircd.cpp
parent48d672de135a497e34b1530225fbb5a72452b841 (diff)
Note to devs: We should be using std::string::clear() to empty a std::string, NOT somestr = "". somestr = "" involves a pointless memory allocation and
assignment then de-allocation, whereas clear() just sets the length to 0. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7262 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index b1f383e00..82b209360 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -1216,7 +1216,7 @@ void FileLogger::WriteLogLine(const std::string &line)
{
int written = fprintf(log,"%s",buffer.c_str());
#ifdef WINDOWS
- buffer = "";
+ buffer.clear();
#else
if ((written >= 0) && (written < (int)buffer.length()))
{