summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/result.h7
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:
}
/// 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&& Unwrap() && {
+ ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
+ return std::move(**this);
+ }
+
T&& MoveFrom() {
return std::move(Unwrap());
}