Просмотр исходного кода

ResultVal: Fixed compilation when reassigning a ResultVal.

Subv 11 лет назад
Родитель
Сommit
ca1a87ef7d
1 измененных файлов с 3 добавлено и 3 удалено
  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());
             }
         }