mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-04 15:09:40 +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
|
@ -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…
Reference in a new issue