Renamed parameter va_list, since va_list is reserved (which caused
compilation errors on VS). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12818 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
57c3cbae3e
commit
c42804dae5
@ -128,7 +128,7 @@ void Log::resetTerminalColor()
|
|||||||
* \param va_list The values to be printed for the format.
|
* \param va_list The values to be printed for the format.
|
||||||
*/
|
*/
|
||||||
void Log::printMessage(int level, const char *component, const char *format,
|
void Log::printMessage(int level, const char *component, const char *format,
|
||||||
VALIST va_list)
|
VALIST args)
|
||||||
{
|
{
|
||||||
assert(level>=0 && level <=LL_FATAL);
|
assert(level>=0 && level <=LL_FATAL);
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ void Log::printMessage(int level, const char *component, const char *format,
|
|||||||
case LL_FATAL: alp = ANDROID_LOG_FATAL; break;
|
case LL_FATAL: alp = ANDROID_LOG_FATAL; break;
|
||||||
default: alp = ANDROID_LOG_FATAL;
|
default: alp = ANDROID_LOG_FATAL;
|
||||||
}
|
}
|
||||||
__android_log_vprint(alp, "SuperTuxKart", format, va_list);
|
__android_log_vprint(alp, "SuperTuxKart", format, args);
|
||||||
#else
|
#else
|
||||||
static const char *names[] = {"verbose", "debug ", "info ",
|
static const char *names[] = {"verbose", "debug ", "info ",
|
||||||
"warn ", "error ", "fatal "};
|
"warn ", "error ", "fatal "};
|
||||||
@ -161,7 +161,7 @@ void Log::printMessage(int level, const char *component, const char *format,
|
|||||||
VALIST copy;
|
VALIST copy;
|
||||||
if (m_file_stdout)
|
if (m_file_stdout)
|
||||||
{
|
{
|
||||||
va_copy(copy, va_list);
|
va_copy(copy, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we don't have a console file, write to stdout and hope for the best
|
// If we don't have a console file, write to stdout and hope for the best
|
||||||
@ -169,7 +169,7 @@ void Log::printMessage(int level, const char *component, const char *format,
|
|||||||
UserConfigParams::m_log_errors_to_console) // log to console & file
|
UserConfigParams::m_log_errors_to_console) // log to console & file
|
||||||
{
|
{
|
||||||
VALIST out;
|
VALIST out;
|
||||||
va_copy(out, va_list);
|
va_copy(out, args);
|
||||||
|
|
||||||
setTerminalColor((LogLevel)level);
|
setTerminalColor((LogLevel)level);
|
||||||
printf("[%s] %s: ", names[level], component);
|
printf("[%s] %s: ", names[level], component);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user