mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	scheduler: Make HaveReadyThreads() a const member function
This function doesn't modify instance state, so the const qualifier can be added to it.
This commit is contained in:
		
							parent
							
								
									11470f331a
								
							
						
					
					
						commit
						e850ff63bc
					
				@ -25,7 +25,7 @@ Scheduler::~Scheduler() {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool Scheduler::HaveReadyThreads() {
 | 
					bool Scheduler::HaveReadyThreads() const {
 | 
				
			||||||
    std::lock_guard<std::mutex> lock(scheduler_mutex);
 | 
					    std::lock_guard<std::mutex> lock(scheduler_mutex);
 | 
				
			||||||
    return ready_queue.get_first() != nullptr;
 | 
					    return ready_queue.get_first() != nullptr;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@ public:
 | 
				
			|||||||
    ~Scheduler();
 | 
					    ~Scheduler();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// Returns whether there are any threads that are ready to run.
 | 
					    /// 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)
 | 
					    /// Reschedules to the next available thread (call after current thread is suspended)
 | 
				
			||||||
    void Reschedule();
 | 
					    void Reschedule();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user