Explorar el Código

ResultVal: Fixed compilation when reassigning a ResultVal.

Subv hace 11 años
padre
commit
ca1a87ef7d
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  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) {
     ResultVal& operator=(const ResultVal& o) {
-        if (*this) {
-            if (o) {
+        if (!empty()) {
+            if (!o.empty()) {
                 *GetPointer() = *o.GetPointer();
                 *GetPointer() = *o.GetPointer();
             } else {
             } else {
                 GetPointer()->~T();
                 GetPointer()->~T();
             }
             }
         } else {
         } else {
-            if (o) {
+            if (!o.empty()) {
                 new (&storage) T(*o.GetPointer());
                 new (&storage) T(*o.GetPointer());
             }
             }
         }
         }