Commit 2d620be6 authored by Victor Zverovich's avatar Victor Zverovich

Pre-allocate space for arguments.

parent 57899300
...@@ -999,6 +999,7 @@ class BasicFormatter { ...@@ -999,6 +999,7 @@ class BasicFormatter {
BasicFormatter(BasicWriter<Char> &w, BasicFormatter(BasicWriter<Char> &w,
const Char *format, std::initializer_list<Arg> args) const Char *format, std::initializer_list<Arg> args)
: writer_(&w), format_(format) { : writer_(&w), format_(format) {
args_.reserve(args.size());
for (const Arg &arg: args) for (const Arg &arg: args)
Add(arg); Add(arg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment