Browse Source

mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference

The pointed to thread's members are simply observed in this case, so we
don't need to copy it here.
Lioncash 8 năm trước cách đây
mục cha
commit
42b5158c96
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/core/hle/kernel/mutex.cpp

+ 1 - 1
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;