mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +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:
@@ -46,6 +46,7 @@ Decorator operator|(Decorator a, Decorator b) {
|
||||
/// @ingroup dom
|
||||
Elements operator|(Elements elements, Decorator decorator) { // NOLINT
|
||||
Elements output;
|
||||
output.reserve(elements.size());
|
||||
for (auto& it : elements) {
|
||||
output.push_back(std::move(it) | decorator);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user