mirror of
				https://git.suyu.dev/suyu/suyu.git
				synced 2025-10-31 23:06:43 +08:00 
			
		
		
		
	common/assert: add unlikely
This commit is contained in:
		
							parent
							
								
									d11547024c
								
							
						
					
					
						commit
						a29ddcee40
					
				| @ -7,7 +7,7 @@ | |||||||
| #include "common/settings.h" | #include "common/settings.h" | ||||||
| 
 | 
 | ||||||
| void assert_check_condition(bool cond, std::function<void()>&& on_failure) { | void assert_check_condition(bool cond, std::function<void()>&& on_failure) { | ||||||
|     if (!cond) { |     if (!cond) [[unlikely]] { | ||||||
|         on_failure(); |         on_failure(); | ||||||
| 
 | 
 | ||||||
|         if (Settings::values.use_debug_asserts) { |         if (Settings::values.use_debug_asserts) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user