Fix some issues with formatted_print:
* Add a va_list version which can be correctly used by ivprintf (fixes pycdas output) * Use a `const char*` format parameter to avoid the need for clang warning workarounds * Make better use of return values.
This commit is contained in:
@@ -58,11 +58,12 @@ static void iputs(std::ostream& pyc_output, int indent, const char* text)
|
||||
pyc_output << text;
|
||||
}
|
||||
|
||||
static void ivprintf(std::ostream& pyc_output, int indent, const char* fmt, va_list varargs)
|
||||
static void ivprintf(std::ostream& pyc_output, int indent, const char* fmt,
|
||||
va_list varargs)
|
||||
{
|
||||
for (int i=0; i<indent; i++)
|
||||
pyc_output << " ";
|
||||
formatted_print(pyc_output, fmt, varargs);
|
||||
formatted_printv(pyc_output, fmt, varargs);
|
||||
}
|
||||
|
||||
static void iprintf(std::ostream& pyc_output, int indent, const char* fmt, ...)
|
||||
|
Reference in New Issue
Block a user