mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Thread: Use std::find in CheckWait_WaitObject.
This commit is contained in:
		
							parent
							
								
									2f3020a102
								
							
						
					
					
						commit
						4255f25647
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -85,10 +85,11 @@ static void ChangeReadyState(Thread* t, bool ready) { | ||||||
| 
 | 
 | ||||||
| /// Check if a thread is waiting on a the specified wait object
 | /// Check if a thread is waiting on a the specified wait object
 | ||||||
| static bool CheckWait_WaitObject(const Thread* thread, WaitObject* wait_object) { | static bool CheckWait_WaitObject(const Thread* thread, WaitObject* wait_object) { | ||||||
|     for (auto itr = thread->wait_objects.begin(); itr != thread->wait_objects.end(); ++itr) { |     auto itr = std::find(thread->wait_objects.begin(), thread->wait_objects.end(), wait_object); | ||||||
|         if (*itr == wait_object) | 
 | ||||||
|             return (thread->IsWaiting()); |     if (itr != thread->wait_objects.end()) | ||||||
|     } |         return thread->IsWaiting(); | ||||||
|  | 
 | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue