aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/loader.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-15 18:25:57 -0400
committerGitHub <noreply@github.com>2018-08-15 18:25:57 -0400
commit73e0f3f1ce893a4f01a5d46a3e2292acc92f351f (patch)
tree334d2ea7d8997163640af2d0d2e25c841597241a /src/core/loader/loader.cpp
parent0bd47dfb223bbd913ae11ffa9deb6919ea22debf (diff)
parentaaed7027903544c80df4e03f62a96ba8ffa9cf5e (diff)
Merge pull request #1079 from lioncash/fmt
loader: Make ResultStatus directly compatible with fmt
Diffstat (limited to 'src/core/loader/loader.cpp')
-rw-r--r--src/core/loader/loader.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index b143f043cd..5e07a3f107 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <memory>
+#include <ostream>
#include <string>
#include "common/logging/log.h"
#include "common/string_util.h"
@@ -119,14 +120,9 @@ constexpr std::array<const char*, 36> RESULT_MESSAGES{
"There is no control data available.",
};
-std::string GetMessageForResultStatus(ResultStatus status) {
- return GetMessageForResultStatus(static_cast<u16>(status));
-}
-
-std::string GetMessageForResultStatus(u16 status) {
- if (status >= 36)
- return "";
- return RESULT_MESSAGES[status];
+std::ostream& operator<<(std::ostream& os, ResultStatus status) {
+ os << RESULT_MESSAGES.at(static_cast<size_t>(status));
+ return os;
}
/**