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
This commit is contained in:
brain 2007-06-09 12:02:35 +00:00
parent 48d672de13
commit 3936814ac6

View File

@ -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()))
{