mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 20:19:02 -04:00
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:
parent
48d672de13
commit
3936814ac6
@ -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()))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user