Quellcode durchsuchen

ResultVal: Fixed compilation when reassigning a ResultVal.

Subv vor 11 Jahren
Ursprung
Commit
ca1a87ef7d
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  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());
             }
         }