diff options
| author | 2015-08-02 18:30:24 -0400 | |
|---|---|---|
| committer | 2015-08-02 18:30:24 -0400 | |
| commit | 0298b7bedd17f88430486dd502fb7923b1d10f26 (patch) | |
| tree | e56edb5024da1c03b2021c428988f8a710417565 /src/common/logging/text_formatter.cpp | |
| parent | Handle invalid `Log::Level::Count` (diff) | |
| download | yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.gz yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.xz yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.zip | |
Use UNREACHABLE macro for impossible cases in previous commit
Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
Diffstat (limited to 'src/common/logging/text_formatter.cpp')
| -rw-r--r-- | src/common/logging/text_formatter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index e3bb148bb..de195b0f7 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp | |||
| @@ -84,7 +84,7 @@ void PrintColoredMessage(const Entry& entry) { | |||
| 84 | case Level::Critical: // Bright magenta | 84 | case Level::Critical: // Bright magenta |
| 85 | color = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break; | 85 | color = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break; |
| 86 | case Level::Count: | 86 | case Level::Count: |
| 87 | ASSERT_MSG(false, "invalid log level"); break; | 87 | UNREACHABLE(); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | SetConsoleTextAttribute(console_handle, color); | 90 | SetConsoleTextAttribute(console_handle, color); |
| @@ -105,7 +105,7 @@ void PrintColoredMessage(const Entry& entry) { | |||
| 105 | case Level::Critical: // Bright magenta | 105 | case Level::Critical: // Bright magenta |
| 106 | color = ESC "[1;35m"; break; | 106 | color = ESC "[1;35m"; break; |
| 107 | case Level::Count: | 107 | case Level::Count: |
| 108 | ASSERT_MSG(false, "invalid log level"); break; | 108 | UNREACHABLE(); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | fputs(color, stderr); | 111 | fputs(color, stderr); |