Fix slow score writing.

f << endl; is roughly equivalent to fprintf(f, "\n"; fflush(f);.  Never use endl
unless you really, explicitly want to flush the stream.
This commit is contained in:
Glenn Maynard
2003-10-23 21:00:47 +00:00
parent 2bf68f6938
commit e35fee68f0
+4 -4
View File
@@ -348,19 +348,19 @@ bool FileRead( ifstream& f, float& fOut )
}
void FileWrite( ofstream& f, const CString& sWrite )
{
f << sWrite << endl;
f << sWrite << "\n";
}
void FileWrite( ofstream& f, int iWrite )
{
f << iWrite << endl;
f << iWrite << "\n";
}
void FileWrite( ofstream& f, size_t uWrite )
{
f << uWrite << endl;
f << uWrite << "\n";
}
void FileWrite( ofstream& f, float fWrite )
{
f << fWrite << endl;
f << fWrite << "\n";
}
#define WARN_AND_RETURN { LOG->Warn("Error parsing file '%s' at %s:%d",fn.c_str(),__FILE__,__LINE__); return; }