don't use macros with variable number of arguments - no version of VC supports it
use existing WARN macro which falls back to printf if LOG isn't yet constructed
This commit is contained in:
@@ -413,19 +413,22 @@ void RageLog::UnmapLog( const RString &key )
|
||||
UpdateMappedLog();
|
||||
}
|
||||
|
||||
void ShowWarning( const char *file, int line, const char *message )
|
||||
void ShowWarningOrTrace( const char *file, int line, const char *message, bool bWarning )
|
||||
{
|
||||
/* Ignore everything up to and including the first "src/". */
|
||||
const char *temp = strstr( file, "src/" );
|
||||
if( temp )
|
||||
file = temp + 4;
|
||||
|
||||
if( LOG != NULL )
|
||||
LOG->Warn( "%s:%i: %s", file, line, message );
|
||||
|
||||
void (RageLog::*method)(const char *fmt, ...) = bWarning ? RageLog::Warn : RageLog::Trace;
|
||||
|
||||
if( LOG )
|
||||
(LOG->*method)( "%s:%i: %s", file, line, message );
|
||||
else
|
||||
fprintf( stderr, "%s:%i: %s", file, line, message );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user