simplify
This commit is contained in:
@@ -228,14 +228,18 @@ void RageLog::Write( int where, const CString &line )
|
|||||||
if( where & WRITE_LOUD )
|
if( where & WRITE_LOUD )
|
||||||
printf( "/////////////////////////////////////////\n" );
|
printf( "/////////////////////////////////////////\n" );
|
||||||
|
|
||||||
|
CString LineHeader;
|
||||||
|
if( m_bTimestamping )
|
||||||
|
LineHeader += SecondsToTime(RageTimer::GetTimeSinceStart()) + ": ";
|
||||||
|
if( where & WRITE_LOUD )
|
||||||
|
LineHeader += "WARNING: ";
|
||||||
|
|
||||||
for( unsigned i = 0; i < lines.size(); ++i )
|
for( unsigned i = 0; i < lines.size(); ++i )
|
||||||
{
|
{
|
||||||
CString &str = lines[i];
|
CString &str = lines[i];
|
||||||
|
|
||||||
if( where & WRITE_LOUD )
|
if( LineHeader.size() )
|
||||||
str = "WARNING: " + str;
|
str.insert( 0, LineHeader );
|
||||||
if( m_bTimestamping )
|
|
||||||
str = SecondsToTime(RageTimer::GetTimeSinceStart()) + ": " + str;
|
|
||||||
|
|
||||||
if( where&WRITE_TO_INFO && g_fileInfo.IsOpen() )
|
if( where&WRITE_TO_INFO && g_fileInfo.IsOpen() )
|
||||||
g_fileInfo.PutLine( str );
|
g_fileInfo.PutLine( str );
|
||||||
|
|||||||
Reference in New Issue
Block a user