From 1c78584f41541a818180c49e6ab8606a5b537fc6 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 25 Nov 2023 03:01:21 +0300 Subject: [PATCH] rsx: Remove unnecessary "else" clauses --- rpcs3/Emu/RSX/Core/RSXIOMap.hpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/rpcs3/Emu/RSX/Core/RSXIOMap.hpp b/rpcs3/Emu/RSX/Core/RSXIOMap.hpp index 4632160bfd..2fd6ba987e 100644 --- a/rpcs3/Emu/RSX/Core/RSXIOMap.hpp +++ b/rpcs3/Emu/RSX/Core/RSXIOMap.hpp @@ -23,10 +23,8 @@ namespace rsx { return ref.try_lock_shared(); } - else - { - return ref.try_lock(); - } + + return ref.try_lock(); } void lock() @@ -34,11 +32,10 @@ namespace rsx if constexpr (Shared) { ref.lock_shared(); + return; } - else - { - ref.lock(); - } + + ref.lock(); } }; } @@ -82,13 +79,12 @@ namespace rsx if (!self || self->id_type() != 0x55u) { mutex_.lock(); + continue; } - else + + while (!mutex_.try_lock()) { - while (!mutex_.try_lock()) - { - self->cpu_wait({}); - } + self->cpu_wait({}); } } }