aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/result.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-20 22:04:09 -0700
committerGitHub <noreply@github.com>2017-06-20 22:04:09 -0700
commitb21dfbb2956698b05104bc68c0b08ade0d671fd8 (patch)
tree2f39f319f1391d4be12e50d1504c2bfc06b35cc2 /src/core/hle/result.h
parent96dcccc80ce16dbf60fc629d7659d6b9d19e27f0 (diff)
parent723dc644faa6e29250d1b7fa914dfb7c75d8aec5 (diff)
Merge pull request #2790 from yuriks/remove-movefrom
Remove ResultVal::MoveFrom
Diffstat (limited to 'src/core/hle/result.h')
-rw-r--r--src/core/hle/result.h7
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: