summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-15 05:38:37 -0400
committerLioncash <mathew1800@gmail.com>2018-08-15 05:52:37 -0400
commit87d8a9c98626be491e87e4b9fad84b862d8aa0c9 (patch)
treed242adb55cd5998b6f5ee20462717d6a916bb552 /src/yuzu_cmd
parent301baaa94206e3b185f259e6c44bdc8e6c0a3879 (diff)
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')
-rw-r--r--src/yuzu_cmd/yuzu.cpp4
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 @@
#include <string>
#include <thread>
+#include <fmt/ostream.h>
+
#include "common/common_paths.h"
#include "common/logging/backend.h"
#include "common/logging/filter.h"
@@ -194,7 +196,7 @@ int main(int argc, char** argv) {
"While attempting to load the ROM requested, an error occured. Please "
"refer to the yuzu wiki for more information or the yuzu discord for "
"additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}",
- loader_id, error_id, Loader::GetMessageForResultStatus(error_id));
+ loader_id, error_id, static_cast<Loader::ResultStatus>(error_id));
}
}