mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	kernel/thread: Make GetFreeThreadLocalSlot() reference parameter a const reference
This function only reads the data being referenced, it doesn't modify it, so we can turn the reference into a const reference.
This commit is contained in:
		
							parent
							
								
									c71c9e63ec
								
							
						
					
					
						commit
						893d9c5ff3
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -286,7 +286,8 @@ static void DebugThreadQueue() { | |||
|  * slot: The index of the first free slot in the indicated page. | ||||
|  * alloc_needed: Whether there's a need to allocate a new TLS page (All pages are full). | ||||
|  */ | ||||
| static std::tuple<u32, u32, bool> GetFreeThreadLocalSlot(std::vector<std::bitset<8>>& tls_slots) { | ||||
| static std::tuple<u32, u32, bool> GetFreeThreadLocalSlot( | ||||
|     const std::vector<std::bitset<8>>& tls_slots) { | ||||
|     // Iterate over all the allocated pages, and try to find one where not all slots are used.
 | ||||
|     for (unsigned page = 0; page < tls_slots.size(); ++page) { | ||||
|         const auto& page_tls_slots = tls_slots[page]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue