summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-06 02:29:14 +0200
committerbunnei <bunneidev@gmail.com>2022-10-19 04:13:34 +0200
commitcb073f95dc6ef07934a47137b121a1328667df6b (patch)
treee0a788db124137d2c84f3be55921a447d2e9c0ef /src/core
parentcore: hle: kernel: svc_common: Add WaitInfinite & cleanup. (diff)
downloadyuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.gz
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.bz2
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.lz
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.xz
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.tar.zst
yuzu-cb073f95dc6ef07934a47137b121a1328667df6b.zip
Diffstat (limited to '')
-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 {
[[nodiscard]] constexpr bool IsFailure() const {
return !IsSuccess();
}
+
+ [[nodiscard]] constexpr u32 GetInnerValue() const {
+ return static_cast<u32>(module.Value()) | (description << module.bits);
+ }
+
+ [[nodiscard]] constexpr bool Includes(Result result) const {
+ return GetInnerValue() == result.GetInnerValue();
+ }
};
static_assert(std::is_trivial_v<Result>);