Codechange: use fmt in DebugPrint where applicable

This commit is contained in:
rubidium42
2021-06-12 11:32:57 +02:00
committed by rubidium42
parent 352dbdd570
commit 7d79180040
2 changed files with 16 additions and 20 deletions

View File

@@ -28,15 +28,14 @@
* 6.. - extremely detailed spamming
*/
void debug_print(const char *dbg, const char *buf);
/**
* Ouptut a line of debugging information.
* @param name The category of debug information.
* @param level The maximum debug level this message should be shown at. When the debug level for this category is set lower, then the message will not be shown.
* @param format_string The formatting string of the message.
*/
#define Debug(name, level, format_string, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) debug_print(#name, fmt::format(FMT_STRING(format_string), ## __VA_ARGS__).c_str())
#define Debug(name, level, format_string, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) DebugPrint(#name, fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))
void DebugPrint(const char *level, const std::string &message);
extern int _debug_driver_level;
extern int _debug_grf_level;