diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-19 03:49:46 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-19 03:49:46 +0200 |
commit | 4cb47b027888de95aa0d432338909b65b33feec7 (patch) | |
tree | 03d8acb029c860ffd85c3a2ba277174b3d2224b5 /src/core/hle/result.h | |
parent | Merge pull request #2776 from wwylele/geo-factor (diff) | |
download | yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar.gz yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar.bz2 yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar.lz yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar.xz yuzu-4cb47b027888de95aa0d432338909b65b33feec7.tar.zst yuzu-4cb47b027888de95aa0d432338909b65b33feec7.zip |
Diffstat (limited to '')
-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: } /// 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()); } |