diff options
| author | 2015-08-02 12:55:31 -0400 | |
|---|---|---|
| committer | 2015-08-02 12:55:31 -0400 | |
| commit | 9ff23da2550dd159d81933c0236529ececc526b5 (patch) | |
| tree | a0d000b990dd935986bd41437e51f01b97a086bd /src/common/logging/backend.cpp | |
| parent | Merge pull request #999 from LittleWhite-tb/qt-save-location (diff) | |
| download | yuzu-9ff23da2550dd159d81933c0236529ececc526b5.tar.gz yuzu-9ff23da2550dd159d81933c0236529ececc526b5.tar.xz yuzu-9ff23da2550dd159d81933c0236529ececc526b5.zip | |
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.
Diffstat (limited to 'src/common/logging/backend.cpp')
| -rw-r--r-- | src/common/logging/backend.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index d85e58373..68580e1c0 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <array> | 6 | #include <array> |
| 7 | #include <cstdio> | 7 | #include <cstdio> |
| 8 | 8 | ||
| 9 | #include "common/assert.h" | ||
| 9 | #include "common/common_funcs.h" // snprintf compatibility define | 10 | #include "common/common_funcs.h" // snprintf compatibility define |
| 10 | #include "common/logging/backend.h" | 11 | #include "common/logging/backend.h" |
| 11 | #include "common/logging/filter.h" | 12 | #include "common/logging/filter.h" |
| @@ -78,8 +79,10 @@ const char* GetLevelName(Level log_level) { | |||
| 78 | LVL(Warning); | 79 | LVL(Warning); |
| 79 | LVL(Error); | 80 | LVL(Error); |
| 80 | LVL(Critical); | 81 | LVL(Critical); |
| 82 | case Level::Count: | ||
| 83 | ASSERT_MSG(false, "invalid log level"); | ||
| 84 | return "Unknown"; | ||
| 81 | } | 85 | } |
| 82 | return "Unknown"; | ||
| 83 | #undef LVL | 86 | #undef LVL |
| 84 | } | 87 | } |
| 85 | 88 | ||