mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
AK: Make StringBuilder::appendf() pre-allocate the format string length.
This commit is contained in:
parent
fa89446cb6
commit
30b0e5f82e
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ void StringBuilder::appendf(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
will_append(strlen(fmt));
|
||||||
appendvf(fmt, ap);
|
appendvf(fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue