Optimize inserts in vector and refactor const reference objects (#659)

Signed-off-by: German Semenov <GermanAizek@yandex.ru>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Herman Semenov
2023-05-31 20:24:08 +03:00
committed by GitHub
parent 8bea9261bc
commit d464a071da
10 changed files with 21 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ class Flexbox : public Node {
void Layout(flexbox_helper::Global& global,
bool compute_requirement = false) {
global.blocks.reserve(children_.size());
for (auto& child : children_) {
flexbox_helper::Block block;
block.min_size_x = child->requirement().min_x;