فهرست منبع

Merge pull request #2415 from lioncash/const

kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
bunnei 7 سال پیش
والد
کامیت
62c2404d3c
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/core/hle/kernel/wait_object.cpp
  2. 1 1
      src/core/hle/kernel/wait_object.h

+ 1 - 1
src/core/hle/kernel/wait_object.cpp

@@ -30,7 +30,7 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {
         waiting_threads.erase(itr);
         waiting_threads.erase(itr);
 }
 }
 
 
-SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() {
+SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() const {
     Thread* candidate = nullptr;
     Thread* candidate = nullptr;
     u32 candidate_priority = THREADPRIO_LOWEST + 1;
     u32 candidate_priority = THREADPRIO_LOWEST + 1;
 
 

+ 1 - 1
src/core/hle/kernel/wait_object.h

@@ -54,7 +54,7 @@ public:
     void WakeupWaitingThread(SharedPtr<Thread> thread);
     void WakeupWaitingThread(SharedPtr<Thread> thread);
 
 
     /// Obtains the highest priority thread that is ready to run from this object's waiting list.
     /// Obtains the highest priority thread that is ready to run from this object's waiting list.
-    SharedPtr<Thread> GetHighestPriorityReadyThread();
+    SharedPtr<Thread> GetHighestPriorityReadyThread() const;
 
 
     /// Get a const reference to the waiting threads list for debug use
     /// Get a const reference to the waiting threads list for debug use
     const std::vector<SharedPtr<Thread>>& GetWaitingThreads() const;
     const std::vector<SharedPtr<Thread>>& GetWaitingThreads() const;