summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-08-05 17:59:06 +0200
committerbunnei <bunneidev@gmail.com>2015-08-05 17:59:06 +0200
commitb6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5 (patch)
tree509244f0525c8b1a304134d7c33a631cec0f95d3 /src/common
parentMerge pull request #1015 from yuriks/vertex-caching (diff)
parentUse UNREACHABLE macro for impossible cases in previous commit (diff)
downloadyuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar.gz
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar.bz2
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar.lz
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar.xz
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.tar.zst
yuzu-b6c241d667dd6a22b1dadaf9c2d6ddaac2e93de5.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/logging/backend.cpp4
-rw-r--r--src/common/logging/text_formatter.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index d85e58373..0a081e7d4 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -6,6 +6,7 @@
#include <array>
#include <cstdio>
+#include "common/assert.h"
#include "common/common_funcs.h" // snprintf compatibility define
#include "common/logging/backend.h"
#include "common/logging/filter.h"
@@ -78,8 +79,9 @@ const char* GetLevelName(Level log_level) {
LVL(Warning);
LVL(Error);
LVL(Critical);
+ case Level::Count:
+ UNREACHABLE();
}
- return "Unknown";
#undef LVL
}
diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp
index 94f3dfc1f..de195b0f7 100644
--- a/src/common/logging/text_formatter.cpp
+++ b/src/common/logging/text_formatter.cpp
@@ -14,6 +14,7 @@
#include "common/logging/log.h"
#include "common/logging/text_formatter.h"
+#include "common/assert.h"
#include "common/common_funcs.h"
#include "common/string_util.h"
@@ -82,6 +83,8 @@ void PrintColoredMessage(const Entry& entry) {
color = FOREGROUND_RED | FOREGROUND_INTENSITY; break;
case Level::Critical: // Bright magenta
color = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break;
+ case Level::Count:
+ UNREACHABLE();
}
SetConsoleTextAttribute(console_handle, color);
@@ -101,6 +104,8 @@ void PrintColoredMessage(const Entry& entry) {
color = ESC "[1;31m"; break;
case Level::Critical: // Bright magenta
color = ESC "[1;35m"; break;
+ case Level::Count:
+ UNREACHABLE();
}
fputs(color, stderr);