summaryrefslogtreecommitdiffstats
path: root/src/core/hle/result.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/result.h')
-rw-r--r--src/core/hle/result.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index 948b9e38e..9dbd5a914 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -307,14 +307,14 @@ public:
}
ResultVal& operator=(const ResultVal& o) {
- if (*this) {
- if (o) {
+ if (!empty()) {
+ if (!o.empty()) {
*GetPointer() = *o.GetPointer();
} else {
GetPointer()->~T();
}
} else {
- if (o) {
+ if (!o.empty()) {
new (&storage) T(*o.GetPointer());
}
}
@@ -363,7 +363,7 @@ public:
/// Asserts that the result succeeded and returns a reference to it.
T& Unwrap() {
// TODO(yuriks): Should be a release assert
- _assert_msg_(Common, Succeeded(), "Tried to Unwrap empty ResultVal");
+ ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
return **this;
}