From a43ee8d752187bee8cc1dbfe8fef8b27e891b974 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 24 Jul 2019 07:18:48 -0400 Subject: [PATCH] kernel/vm_manager: std::move shared_ptr instance in MergeAdjacentVMA Avoids an unnecessary atomic reference count increment and decrement. --- src/core/hle/kernel/vm_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index e86796ba58..721f7cc44d 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -773,7 +773,7 @@ void VMManager::MergeAdjacentVMA(VirtualMemoryArea& left, const VirtualMemoryAre new_memory->insert(new_memory->end(), left_begin, left_end); new_memory->insert(new_memory->end(), right_begin, right_end); - left.backing_block = new_memory; + left.backing_block = std::move(new_memory); left.offset = 0; }