summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-06-12 11:32:57 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-13 12:45:45 +0200
commit7d791800408b6fc41f716f116e88135f02e18270 (patch)
tree7d7069249209cefe26786a827a5baa28ad8951dc /src/debug.h
parent352dbdd570c3bd64ddcf0d4c7473107ad3de622e (diff)
downloadopenttd-7d791800408b6fc41f716f116e88135f02e18270.tar.xz
Codechange: use fmt in DebugPrint where applicable
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/debug.h b/src/debug.h
index fb33bcf2d..37375fb08 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -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;