diff options
Diffstat (limited to 'src/core/hle/result.h')
-rw-r--r-- | src/core/hle/result.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 5f2cdbb96..47b6e2b23 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -388,13 +388,14 @@ public: } /// Asserts that the result succeeded and returns a reference to it. - T& Unwrap() { + T& Unwrap() & { ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); return **this; } - T&& MoveFrom() { - return std::move(Unwrap()); + T&& Unwrap() && { + ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); + return std::move(**this); } private: |