summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-12 10:45:21 +0100
committerLioncash <mathew1800@gmail.com>2019-11-12 13:55:38 +0100
commitef060ed40c009c4d7b46a0979aa99c117861bc21 (patch)
tree9a085f4e0c2cb82ac4dce0e5e6f611af78792423 /src/core
parentcrypto: Resolve sign-conversion warnings (diff)
downloadyuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar.gz
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar.bz2
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar.lz
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar.xz
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.tar.zst
yuzu-ef060ed40c009c4d7b46a0979aa99c117861bc21.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/result.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index 500ea882c..450f61fea 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -147,6 +147,14 @@ constexpr bool operator!=(const ResultCode& a, const ResultCode& b) {
constexpr ResultCode RESULT_SUCCESS(0);
/**
+ * Placeholder result code used for unknown error codes.
+ *
+ * @note This should only be used when a particular error code
+ * is not known yet.
+ */
+constexpr ResultCode RESULT_UNKNOWN(UINT32_MAX);
+
+/**
* This is an optional value type. It holds a `ResultCode` and, if that code is a success code,
* also holds a result of type `T`. If the code is an error code then trying to access the inner
* value fails, thus ensuring that the ResultCode of functions is always checked properly before
@@ -183,7 +191,7 @@ class ResultVal {
public:
/// Constructs an empty `ResultVal` with the given error code. The code must not be a success
/// code.
- ResultVal(ResultCode error_code = ResultCode(UINT32_MAX)) : result_code(error_code) {
+ ResultVal(ResultCode error_code = RESULT_UNKNOWN) : result_code(error_code) {
ASSERT(error_code.IsError());
}