From 882f64776039eae9e26694305bf510597384aa3f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 17 Apr 2019 06:44:31 -0400 Subject: [PATCH] kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function This doesn't actually modify internal state of a wait object, so it can be const qualified. --- src/core/hle/kernel/wait_object.cpp | 2 +- src/core/hle/kernel/wait_object.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/kernel/wait_object.cpp b/src/core/hle/kernel/wait_object.cpp index b2835ffbdc..94ae632cde 100644 --- a/src/core/hle/kernel/wait_object.cpp +++ b/src/core/hle/kernel/wait_object.cpp @@ -32,7 +32,7 @@ void WaitObject::RemoveWaitingThread(Thread* thread) { waiting_threads.erase(itr); } -std::shared_ptr WaitObject::GetHighestPriorityReadyThread() { +std::shared_ptr WaitObject::GetHighestPriorityReadyThread() const { Thread* candidate = nullptr; u32 candidate_priority = ThreadPrioLowest + 1; diff --git a/src/core/hle/kernel/wait_object.h b/src/core/hle/kernel/wait_object.h index 5c2f38be8e..cbfed01d23 100644 --- a/src/core/hle/kernel/wait_object.h +++ b/src/core/hle/kernel/wait_object.h @@ -49,7 +49,7 @@ public: virtual void WakeupAllWaitingThreads(); /// Obtains the highest priority thread that is ready to run from this object's waiting list. - std::shared_ptr GetHighestPriorityReadyThread(); + std::shared_ptr GetHighestPriorityReadyThread() const; /// Get a const reference to the waiting threads list for debug use const std::vector>& GetWaitingThreads() const;