diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-15 11:38:37 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-15 11:52:37 +0200 |
commit | 87d8a9c98626be491e87e4b9fad84b862d8aa0c9 (patch) | |
tree | d242adb55cd5998b6f5ee20462717d6a916bb552 /src/core/loader/loader.cpp | |
parent | Merge pull request #1067 from lioncash/init (diff) | |
download | yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.gz yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.bz2 yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.lz yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.xz yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.tar.zst yuzu-87d8a9c98626be491e87e4b9fad84b862d8aa0c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/loader.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index b143f043c..5e07a3f10 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; } /** |