From 507effce5b0f485139d6cc7bd82b6de8bfbf2f1c Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Thu, 16 Sep 2021 00:02:03 -0700 Subject: [PATCH] LibPDF: Use move to avoid unnecessary ref/unref of network device RefPtr Flagged by pvs-studio as a potential perf optimization. --- Userland/Libraries/LibPDF/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibPDF/Document.cpp b/Userland/Libraries/LibPDF/Document.cpp index 582a1c90f9b..3705ee30e4c 100644 --- a/Userland/Libraries/LibPDF/Document.cpp +++ b/Userland/Libraries/LibPDF/Document.cpp @@ -305,7 +305,7 @@ NonnullRefPtrVector 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);