Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference

Lioncashecc4f5065a48
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 3f1de32587..feb7b88d20 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -19,7 +19,7 @@ namespace Kernel {
/// Returns the number of threads that are waiting for a mutex, and the highest priority one among
/// those.
static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread(
- SharedPtr<Thread> current_thread, VAddr mutex_addr) {
+ const SharedPtr<Thread>& current_thread, VAddr mutex_addr) {
SharedPtr<Thread> highest_priority_thread;
u32 num_waiters = 0;