mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
core: hle: result: Add GetInnerValue and Includes methods.
This commit is contained in:
parent
e63a5459e3
commit
cb073f95dc
1 changed files with 8 additions and 0 deletions
|
@ -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>);
|
||||
|
||||
|
|
Loading…
Reference in a new issue