mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 16:33:50 +00:00
Use buffer in Common::String::printf slightly more efficiently
svn-id: r44562
This commit is contained in:
parent
95959a88ef
commit
90eebcd245
@ -457,6 +457,9 @@ String String::printf(const char *fmt, ...) {
|
||||
do {
|
||||
size *= 2;
|
||||
output.ensureCapacity(size-1, false);
|
||||
assert(!output.isStorageIntern());
|
||||
size = output._extern._capacity;
|
||||
|
||||
va_start(va, fmt);
|
||||
len = vsnprintf(output._str, size, fmt, va);
|
||||
va_end(va);
|
||||
|
Loading…
x
Reference in New Issue
Block a user