]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Note to devs: We should be using std::string::clear() to empty a std::string, NOT...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 9 Jun 2007 12:02:35 +0000 (12:02 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 9 Jun 2007 12:02:35 +0000 (12:02 +0000)
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

src/inspircd.cpp

index b1f383e008787e06f3f7add01b18f6e3ecaa5936..82b209360464ea942107c3da077e71c732f721fd 100644 (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()))
                {