Pre-allocate space for arguments.

This commit is contained in:
Victor Zverovich 2013-12-06 09:16:50 -08:00
parent 5789930096
commit 2d620be6ff

View File

@ -999,6 +999,7 @@ class BasicFormatter {
BasicFormatter(BasicWriter<Char> &w,
const Char *format, std::initializer_list<Arg> args)
: writer_(&w), format_(format) {
args_.reserve(args.size());
for (const Arg &arg: args)
Add(arg);
}