Преглед изворни кода

LibWeb: Avoid an unnecessary vector copy when generating flex items

Andreas Kling пре 2 година
родитељ
комит
e6448f137e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp

@@ -331,7 +331,7 @@ void FlexFormattingContext::generate_anonymous_flex_items()
     for (auto key : keys) {
         auto order_bucket = order_item_bucket.get(key);
         if (order_bucket.has_value()) {
-            auto items = order_bucket.value();
+            auto& items = order_bucket.value();
             if (is_direction_reverse()) {
                 for (auto item : items.in_reverse()) {
                     m_flex_items.append(move(item));