diff options
| author | 2018-08-15 05:38:37 -0400 | |
|---|---|---|
| committer | 2018-08-15 05:52:37 -0400 | |
| commit | 87d8a9c98626be491e87e4b9fad84b862d8aa0c9 (patch) | |
| tree | d242adb55cd5998b6f5ee20462717d6a916bb552 /src/yuzu_cmd/yuzu.cpp | |
| parent | Merge pull request #1067 from lioncash/init (diff) | |
| download | yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.gz yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.xz yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.zip | |
loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an
overload of operator<<.
While we're at it, perform proper bounds checking. If something exceeds
the array, it should be a hard fail, because it's, without a doubt, a
programmer error in this case.
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index e44a98311..9095cf27d 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #include <string> | 7 | #include <string> |
| 8 | #include <thread> | 8 | #include <thread> |
| 9 | 9 | ||
| 10 | #include <fmt/ostream.h> | ||
| 11 | |||
| 10 | #include "common/common_paths.h" | 12 | #include "common/common_paths.h" |
| 11 | #include "common/logging/backend.h" | 13 | #include "common/logging/backend.h" |
| 12 | #include "common/logging/filter.h" | 14 | #include "common/logging/filter.h" |
| @@ -194,7 +196,7 @@ int main(int argc, char** argv) { | |||
| 194 | "While attempting to load the ROM requested, an error occured. Please " | 196 | "While attempting to load the ROM requested, an error occured. Please " |
| 195 | "refer to the yuzu wiki for more information or the yuzu discord for " | 197 | "refer to the yuzu wiki for more information or the yuzu discord for " |
| 196 | "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", | 198 | "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", |
| 197 | loader_id, error_id, Loader::GetMessageForResultStatus(error_id)); | 199 | loader_id, error_id, static_cast<Loader::ResultStatus>(error_id)); |
| 198 | } | 200 | } |
| 199 | } | 201 | } |
| 200 | 202 | ||