summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2022-09-05 17:29:14 -0700
committerGravatar bunnei2022-10-18 19:13:34 -0700
commitcb073f95dc6ef07934a47137b121a1328667df6b (patch)
treee0a788db124137d2c84f3be55921a447d2e9c0ef /src
parentcore: hle: kernel: svc_common: Add WaitInfinite & cleanup. (diff)
downloadyuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.gz
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.xz
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.zip
core: hle: result: Add GetInnerValue and Includes methods.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/result.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index d67e68bae..d714dea38 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -135,6 +135,14 @@ union Result {
135 [[nodiscard]] constexpr bool IsFailure() const { 135 [[nodiscard]] constexpr bool IsFailure() const {
136 return !IsSuccess(); 136 return !IsSuccess();
137 } 137 }
138
139 [[nodiscard]] constexpr u32 GetInnerValue() const {
140 return static_cast<u32>(module.Value()) | (description << module.bits);
141 }
142
143 [[nodiscard]] constexpr bool Includes(Result result) const {
144 return GetInnerValue() == result.GetInnerValue();
145 }
138}; 146};
139static_assert(std::is_trivial_v<Result>); 147static_assert(std::is_trivial_v<Result>);
140 148