mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Use UNREACHABLE macro for impossible cases in previous commit
Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
This commit is contained in:
		
							parent
							
								
									9ff23da255
								
							
						
					
					
						commit
						0298b7bedd
					
				
					 2 changed files with 3 additions and 4 deletions
				
			
		|  | @ -80,8 +80,7 @@ const char* GetLevelName(Level log_level) { | |||
|         LVL(Error); | ||||
|         LVL(Critical); | ||||
|         case Level::Count: | ||||
|             ASSERT_MSG(false, "invalid log level"); | ||||
|             return "Unknown"; | ||||
|             UNREACHABLE(); | ||||
|     } | ||||
| #undef LVL | ||||
| } | ||||
|  |  | |||
|  | @ -84,7 +84,7 @@ void PrintColoredMessage(const Entry& entry) { | |||
|     case Level::Critical: // Bright magenta
 | ||||
|         color = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break; | ||||
|     case Level::Count: | ||||
|         ASSERT_MSG(false, "invalid log level"); break; | ||||
|         UNREACHABLE(); | ||||
|     } | ||||
| 
 | ||||
|     SetConsoleTextAttribute(console_handle, color); | ||||
|  | @ -105,7 +105,7 @@ void PrintColoredMessage(const Entry& entry) { | |||
|     case Level::Critical: // Bright magenta
 | ||||
|         color = ESC "[1;35m"; break; | ||||
|     case Level::Count: | ||||
|         ASSERT_MSG(false, "invalid log level"); break; | ||||
|         UNREACHABLE(); | ||||
|     } | ||||
| 
 | ||||
|     fputs(color, stderr); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue