Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
app: preallocate layouts storage
[staging/windowmanager.git]
/
src
/
app.cpp
diff --git
a/src/app.cpp
b/src/app.cpp
index
3f62575
..
e04b89b
100644
(file)
--- 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);