mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
AK: Make CheckedFormatString pass the char array size to StringView
This makes the assumption that we never pass a stack-allocated char array to CheckedFormatString arguments (dbgln, outln, warnln). This assumption seems to hold true for the current state of Serenity code, at least. :^)
This commit is contained in:
parent
4771917184
commit
52d017c611
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ template<typename... Args>
|
|||
struct CheckedFormatString {
|
||||
template<size_t N>
|
||||
consteval CheckedFormatString(char const (&fmt)[N])
|
||||
: m_string { fmt }
|
||||
: m_string { fmt, N - 1 }
|
||||
{
|
||||
#ifdef ENABLE_COMPILETIME_FORMAT_CHECK
|
||||
check_format_parameter_consistency<N, sizeof...(Args)>(fmt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue