diff options
| -rw-r--r-- | src/core/hle/result.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 5f2cdbb96..55bd8d22f 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h | |||
| @@ -388,11 +388,16 @@ public: | |||
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | /// Asserts that the result succeeded and returns a reference to it. | 390 | /// Asserts that the result succeeded and returns a reference to it. |
| 391 | T& Unwrap() { | 391 | T& Unwrap() & { |
| 392 | ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); | 392 | ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); |
| 393 | return **this; | 393 | return **this; |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | T&& Unwrap() && { | ||
| 397 | ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal"); | ||
| 398 | return std::move(**this); | ||
| 399 | } | ||
| 400 | |||
| 396 | T&& MoveFrom() { | 401 | T&& MoveFrom() { |
| 397 | return std::move(Unwrap()); | 402 | return std::move(Unwrap()); |
| 398 | } | 403 | } |