mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	Kernel: Remove CommandLine::get() in favor of lookup()
lookup() returns an Optional<String> which allows us to implement easy default values using lookup(key).value_or(default_value);
This commit is contained in:
		
							parent
							
								
									cebb619f8e
								
							
						
					
					
						commit
						e3b450005f
					
				
					 4 changed files with 2 additions and 14 deletions
				
			
		|  | @ -143,10 +143,7 @@ Vector<HardwareTimer*> TimeManagement::scan_for_non_periodic_timers() | |||
| 
 | ||||
| bool TimeManagement::is_hpet_periodic_mode_allowed() | ||||
| { | ||||
|     if (!kernel_command_line().contains("hpet")) | ||||
|         return true; | ||||
| 
 | ||||
|     auto hpet_mode = kernel_command_line().get("hpet"); | ||||
|     auto hpet_mode = kernel_command_line().lookup("hpet").value_or("periodic"); | ||||
|     if (hpet_mode == "periodic") | ||||
|         return true; | ||||
|     if (hpet_mode == "nonperiodic") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling