summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-15 05:38:37 -0400
committerGravatar Lioncash2018-08-15 05:52:37 -0400
commit87d8a9c98626be491e87e4b9fad84b862d8aa0c9 (patch)
treed242adb55cd5998b6f5ee20462717d6a916bb552 /src/core/loader/loader.h
parentMerge pull request #1067 from lioncash/init (diff)
downloadyuzu-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/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 6dffe451a..b74cfbf8a 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <algorithm> 7#include <algorithm>
8#include <iosfwd>
8#include <memory> 9#include <memory>
9#include <string> 10#include <string>
10#include <utility> 11#include <utility>
@@ -94,8 +95,7 @@ enum class ResultStatus : u16 {
94 ErrorNoControl, 95 ErrorNoControl,
95}; 96};
96 97
97std::string GetMessageForResultStatus(ResultStatus status); 98std::ostream& operator<<(std::ostream& os, ResultStatus status);
98std::string GetMessageForResultStatus(u16 status);
99 99
100/// Interface for loading an application 100/// Interface for loading an application
101class AppLoader : NonCopyable { 101class AppLoader : NonCopyable {