mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-29 16:39:34 +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:
@@ -37,6 +37,8 @@ class GridBox : public Node {
|
||||
for (const auto& line : lines_) {
|
||||
x_size = std::max(x_size, int(line.size()));
|
||||
}
|
||||
|
||||
// Fill in empty cells, in case the user did not used the API correctly:
|
||||
for (auto& line : lines_) {
|
||||
while (line.size() < size_t(x_size)) {
|
||||
line.push_back(filler());
|
||||
|
Reference in New Issue
Block a user