From 3936814ac6919c7c2dca75fac737a46c30510603 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 9 Jun 2007 12:02:35 +0000 Subject: 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 --- src/inspircd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inspircd.cpp') 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())) { -- cgit v1.2.3