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.
This commit is contained in:
Andrew Kaster 2020-01-10 20:09:20 -07:00 committed by Andreas Kling
parent 5accedfedb
commit fe0eb04a22
Notes: sideshowbarker 2024-07-19 10:05:10 +09:00

View file

@ -18,3 +18,13 @@ int get_serial_debug();
#ifndef __serenity__
#define dbgprintf printf
#endif
#ifdef __cplusplus
template <size_t N>
inline int dbgputstr(const char (&array)[N])
{
return ::dbgputstr(array, N);
}
#endif