summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@mit.edu>2015-08-03 00:30:24 +0200
committerBenjamin Barenblat <bbaren@mit.edu>2015-08-03 00:30:24 +0200
commit0298b7bedd17f88430486dd502fb7923b1d10f26 (patch)
treee56edb5024da1c03b2021c428988f8a710417565 /src/common
parentHandle invalid `Log::Level::Count` (diff)
downloadyuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.gz
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.bz2
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.lz
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.xz
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.tar.zst
yuzu-0298b7bedd17f88430486dd502fb7923b1d10f26.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/logging/backend.cpp3
-rw-r--r--src/common/logging/text_formatter.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 68580e1c0..0a081e7d4 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -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
}
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) {
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);