mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05: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
Reference in a new issue