From 87d8a9c98626be491e87e4b9fad84b862d8aa0c9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 15 Aug 2018 05:38:37 -0400 Subject: 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. --- src/yuzu/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 94fb8ae6a..4bbea3f3c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -6,7 +6,10 @@ #include #include #include + +#include #include + #define QT_NO_OPENGL #include #include @@ -454,7 +457,7 @@ bool GMainWindow::LoadROM(const QString& filename) { "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(error_id)))); } else { QMessageBox::critical( this, tr("Error while loading ROM!"), -- cgit v1.2.3