From 2d96fbed7c68dc43e0551a1576d29c922e73705f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 25 Apr 2018 08:03:27 +1000 Subject: [PATCH] Reserve data for # register --- src/main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cc b/src/main.cc index 5fec5ab8..0879d619 100644 --- a/src/main.cc +++ b/src/main.cc @@ -229,6 +229,7 @@ void register_registers() register_manager.add_register('#', make_dyn_reg( [](const Context& context) { StringList res; + res.reserve(context.selections().size()); for (size_t i = 1; i < context.selections().size()+1; ++i) res.push_back(to_string((int)i)); return res;