浏览代码

LibPDF: Use move to avoid unnecessary ref/unref of network device RefPtr

Flagged by pvs-studio as a potential perf optimization.
Brian Gianforcaro 3 年之前
父节点
当前提交
507effce5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibPDF/Document.cpp

+ 1 - 1
Userland/Libraries/LibPDF/Document.cpp

@@ -305,7 +305,7 @@ NonnullRefPtrVector<OutlineItem> Document::build_outline_item_chain(Value const&
         auto next_child = build_outline_item(next_child_dict);
         children.append(next_child);
 
-        current_child_dict = next_child_dict;
+        current_child_dict = move(next_child_dict);
     }
 
     VERIFY(last_ref.as_ref_index() == current_child_index);