AK: Make StringBuilder::appendf() pre-allocate the format string length.

This commit is contained in:
Andreas Kling 2019-04-15 23:56:35 +02:00
parent fa89446cb6
commit 30b0e5f82e

View file

@ -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);
} }