diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-07-28 12:43:09 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | 3a0a0018eec4a3a2cbcb34cf2f2033f86e6f9504 (patch) | |
tree | 07cf9c5766fa3305a8e9d2cf67305ee2e03d4cfe | |
parent | ac5cfd54d5056b645781ef982ce3109581e9edef (diff) |
app: preallocate layouts storage
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r-- | src/app.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp index 3f62575..e04b89b 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -65,6 +65,7 @@ struct result<layouts_type> load_layout(char const *filename) { i >> jlayouts; auto layouts = layouts_type(); + layouts.reserve(jlayouts.size()); std::transform(std::cbegin(jlayouts), std::cend(jlayouts), std::back_inserter(layouts), layout_from_json); |