
Originally Posted by
stinos
I'm using void InternalLogFunction( char* Format, va_list& Args, const int, const bool ); so i need va_start to initialize the va_list.
Indeed, I missed that.
The problem is that the standard doesn't say anything about using va_list in a function with fixed number of parameters, so compilers might behave differently. The parameter you pass to va_start() is defined as the rightmost one and if you follow the standard strictly this makes va_start() useless in your case.
The easiest solution would be to move those last two parameters to the front, but I assume you can't do that, so instead you could change your InternalLogFunction() to something similar to qDebug() stream:
void Log( const char* Format, const T0 arg0, const int iLevel, const bool bLineEnd )
{
InternalLogStream( iLevel, bLineEnd, Format ) << arg0;
}
void Log( const char* Format, const T0 arg0, const int iLevel, const bool bLineEnd )
{
InternalLogStream( iLevel, bLineEnd, Format ) << arg0;
}
To copy to clipboard, switch view to plain text mode
or something like that.
Bookmarks