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

gl_shader_decompiler: Allow std::move to function in SetPredicate

If the variable being moved is const, then std::move will always perform
a copy (since it can't actually move the data).
Lioncash 7 лет назад
Родитель
Сommit
8a86c8d48b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

+ 1 - 1
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -952,7 +952,7 @@ private:
         // Can't assign to the constant predicate.
         // Can't assign to the constant predicate.
         ASSERT(pred != static_cast<u64>(Pred::UnusedIndex));
         ASSERT(pred != static_cast<u64>(Pred::UnusedIndex));
 
 
-        const std::string variable = 'p' + std::to_string(pred) + '_' + suffix;
+        std::string variable = 'p' + std::to_string(pred) + '_' + suffix;
         shader.AddLine(variable + " = " + value + ';');
         shader.AddLine(variable + " = " + value + ';');
         declr_predicates.insert(std::move(variable));
         declr_predicates.insert(std::move(variable));
     }
     }