Add format analysis to format functions in Common.

This commit is contained in:
Andreas Bergmeier 2014-02-22 18:24:25 +01:00
parent 4d9970b148
commit be49ad4151
2 changed files with 8 additions and 8 deletions

View file

@ -261,11 +261,11 @@ public:
// Issues a C++ throw. Normal errors just abort to the game loop,
// which is appropriate for media or dynamic logic errors.
virtual void Error( VERIFY_FORMAT_STRING const char* fmt, ... ) = 0;
virtual void Error( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 ) = 0;
// Fatal errors quit all the way to a system dialog box, which is appropriate for
// static internal errors or cases where the system may be corrupted.
virtual void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... ) = 0;
virtual void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 ) = 0;
// Returns key bound to the command
virtual const char* KeysFromBinding( const char* bind ) = 0;

View file

@ -157,15 +157,15 @@ public:
virtual void BeginRedirect( char* buffer, int buffersize, void ( *flush )( const char* ) );
virtual void EndRedirect();
virtual void SetRefreshOnPrint( bool set );
virtual void Printf( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void Printf( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void VPrintf( const char* fmt, va_list arg );
virtual void DPrintf( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void Warning( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void DWarning( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void DPrintf( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void Warning( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void DWarning( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void PrintWarnings();
virtual void ClearWarnings( const char* reason );
virtual void Error( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... );
virtual void Error( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual bool IsShuttingDown() const
{
return com_shuttingDown;