mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
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:
parent
5accedfedb
commit
fe0eb04a22
Notes:
sideshowbarker
2024-07-19 10:05:10 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/fe0eb04a229 Pull-request: https://github.com/SerenityOS/serenity/pull/1048 Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue