Parcourir la source

ResultVal: Fixed compilation when reassigning a ResultVal.

Subv il y a 11 ans
Parent
commit
ca1a87ef7d
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      src/core/hle/result.h

+ 3 - 3
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());
             }
         }