vapours: fix Clang error about missing return in constexpr function

This commit is contained in:
Léo Lam 2021-11-05 15:46:56 +01:00
parent 027efc4358
commit 11045ec5d0
No known key found for this signature in database
GPG key ID: 0DF30F9081000741

View file

@ -177,7 +177,11 @@ namespace ams {
static_assert(Value != Base::SuccessValue, "Value != Base::SuccessValue");
public:
constexpr ALWAYS_INLINE operator Result() const { return MakeResult(Value); }
constexpr ALWAYS_INLINE operator ResultSuccess() const { OnResultAbort(Value); }
constexpr ALWAYS_INLINE operator ResultSuccess() const {
OnResultAbort(Value);
__builtin_unreachable();
return ResultSuccess();
}
constexpr ALWAYS_INLINE bool IsSuccess() const { return false; }
constexpr ALWAYS_INLINE bool IsFailure() const { return !this->IsSuccess(); }