From 2d620be6ff6cc370f220e7eef54ad739334f81a2 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 6 Dec 2013 09:16:50 -0800 Subject: [PATCH] Pre-allocate space for arguments. --- format.h | 1 + 1 file changed, 1 insertion(+) diff --git a/format.h b/format.h index f336aeca..19ca1e9f 100644 --- a/format.h +++ b/format.h @@ -999,6 +999,7 @@ class BasicFormatter { BasicFormatter(BasicWriter &w, const Char *format, std::initializer_list args) : writer_(&w), format_(format) { + args_.reserve(args.size()); for (const Arg &arg: args) Add(arg); }