mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 10:57:58 -05:00
Handle invalid Log::Level::Count
Add a case of `Log::Level::Count` to all switch statements that dispatch on `Log::Level`. The case simply asserts `false` and notes the invalid log level.
This commit is contained in:
@ -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,10 @@ const char* GetLevelName(Level log_level) {
|
||||
LVL(Warning);
|
||||
LVL(Error);
|
||||
LVL(Critical);
|
||||
case Level::Count:
|
||||
ASSERT_MSG(false, "invalid log level");
|
||||
return "Unknown";
|
||||
}
|
||||
return "Unknown";
|
||||
#undef LVL
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user