mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-21 11:08:09 +08:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user