mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	AK: Make binary_search signature more generic.
This commit is contained in:
		
							parent
							
								
									35c4338625
								
							
						
					
					
						commit
						50d24e4f98
					
				
					 6 changed files with 63 additions and 53 deletions
				
			
		|  | @ -181,10 +181,10 @@ void RangeAllocator::deallocate(Range range) | |||
| 
 | ||||
|     size_t nearby_index = 0; | ||||
|     auto* existing_range = binary_search( | ||||
|         m_available_ranges.span(), range, [](auto& a, auto& b) { | ||||
|             return a.base().get() - b.end().get(); | ||||
|         }, | ||||
|         &nearby_index); | ||||
|         m_available_ranges.span(), | ||||
|         range, | ||||
|         &nearby_index, | ||||
|         [](auto& a, auto& b) { return a.base().get() - b.end().get(); }); | ||||
| 
 | ||||
|     size_t inserted_index = 0; | ||||
|     if (existing_range) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 asynts
						asynts