mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-23 13:22:52 +00:00
hle/result: Add ResultRange overload in ResultVal
Also marks the implicit conversion operator as constexpr instead of consteval as the constructor is not constant evaluated.
This commit is contained in:
parent
b06f9f2606
commit
f3f3f1b7d9
|
@ -181,7 +181,7 @@ public:
|
|||
consteval ResultRange(ErrorModule module, u32 description_start, u32 description_end_)
|
||||
: code{module, description_start}, description_end{description_end_} {}
|
||||
|
||||
[[nodiscard]] consteval operator ResultCode() const {
|
||||
[[nodiscard]] constexpr operator ResultCode() const {
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,8 @@ public:
|
|||
|
||||
constexpr ResultVal(ResultCode code) : expected{Common::Unexpected(code)} {}
|
||||
|
||||
constexpr ResultVal(ResultRange range) : expected{Common::Unexpected(range)} {}
|
||||
|
||||
template <typename U>
|
||||
constexpr ResultVal(U&& val) : expected{std::forward<U>(val)} {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue