From e850ff63bc51eb8ca2ec7b15167315ee648a4f73 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Aug 2018 12:55:56 -0400 Subject: scheduler: Make HaveReadyThreads() a const member function This function doesn't modify instance state, so the const qualifier can be added to it. --- src/core/hle/kernel/scheduler.cpp | 2 +- src/core/hle/kernel/scheduler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 94065c736..e770b9103 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -25,7 +25,7 @@ Scheduler::~Scheduler() { } } -bool Scheduler::HaveReadyThreads() { +bool Scheduler::HaveReadyThreads() const { std::lock_guard lock(scheduler_mutex); return ready_queue.get_first() != nullptr; } diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index 1a4ee8f36..6a61ef64e 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h @@ -21,7 +21,7 @@ public: ~Scheduler(); /// Returns whether there are any threads that are ready to run. - bool HaveReadyThreads(); + bool HaveReadyThreads() const; /// Reschedules to the next available thread (call after current thread is suspended) void Reschedule(); -- cgit v1.2.3