From fcac6a93226fa4367f95ca6a779d1926c3338930 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 21 Jan 2025 05:32:33 +0100 Subject: [PATCH] sys_event: remove unnecessary copy --- rpcs3/Emu/Cell/lv2/sys_event.cpp | 4 +--- rpcs3/Emu/Cell/lv2/sys_process.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_event.cpp b/rpcs3/Emu/Cell/lv2/sys_event.cpp index d5ad126142..db72972b91 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event.cpp @@ -420,10 +420,8 @@ error_code sys_event_queue_tryreceive(ppu_thread& ppu, u32 equeue_id, vm::ptrevents.empty()) { auto& dest = events[count++]; - const auto event = queue->events.front(); + std::tie(dest.source, dest.data1, dest.data2, dest.data3) = queue->events.front(); queue->events.pop_front(); - - std::tie(dest.source, dest.data1, dest.data2, dest.data3) = event; } lock.unlock(); diff --git a/rpcs3/Emu/Cell/lv2/sys_process.cpp b/rpcs3/Emu/Cell/lv2/sys_process.cpp index 45eb5c1858..b914408ec9 100644 --- a/rpcs3/Emu/Cell/lv2/sys_process.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_process.cpp @@ -271,7 +271,7 @@ error_code _sys_process_get_paramsfo(vm::ptr buffer) { sys_process.warning("_sys_process_get_paramsfo(buffer=0x%x)", buffer); - if (!Emu.GetTitleID().length()) + if (Emu.GetTitleID().empty()) { return CELL_ENOENT; }