From fe0eb04a229bcc76679a7e61e6007803a338e311 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Fri, 10 Jan 2020 20:09:20 -0700 Subject: [PATCH] Kernel: Overload dbgputstr for char array literals in C++ This just seems like something we should be able to do. The compiler knows how long my "string literal" is, passing it along manually seems siilly. --- Kernel/kstdio.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Kernel/kstdio.h b/Kernel/kstdio.h index 34e745a5dc..e297ffc149 100644 --- a/Kernel/kstdio.h +++ b/Kernel/kstdio.h @@ -18,3 +18,13 @@ int get_serial_debug(); #ifndef __serenity__ #define dbgprintf printf #endif + +#ifdef __cplusplus + +template +inline int dbgputstr(const char (&array)[N]) +{ + return ::dbgputstr(array, N); +} + +#endif