From 9ffd4006851db6416cb62bef7c2528e9e456d79e Mon Sep 17 00:00:00 2001 From: wwylele Date: Tue, 27 Mar 2018 13:14:24 +0300 Subject: [PATCH] gl_shader_decompiler: add missing headers/rename GetXXX to MoveXXX to reflect that they move the data --- .../renderer_opengl/gl_shader_decompiler.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 6b5a754972..cac646b5db 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -3,8 +3,11 @@ // Refer to the license.txt file included. #include +#include #include #include +#include +#include #include #include "common/assert.h" #include "common/common_types.h" @@ -64,7 +67,7 @@ public: throw DecompileFail("Program does not always end"); } - std::set GetSubroutines() { + std::set MoveSubroutines() { return std::move(subroutines); } @@ -203,7 +206,7 @@ public: shader_source += text + '\n'; } - std::string GetResult() { + std::string MoveResult() { return std::move(shader_source); } @@ -256,8 +259,8 @@ public: Generate(); } - std::string GetShaderCode() { - return shader.GetResult(); + std::string MoveShaderCode() { + return shader.MoveResult(); } private: @@ -910,10 +913,10 @@ boost::optional DecompileProgram(const ProgramCode& program_code, bool is_gs) { try { - auto subroutines = ControlFlowAnalyzer(program_code, main_offset).GetSubroutines(); + auto subroutines = ControlFlowAnalyzer(program_code, main_offset).MoveSubroutines(); GLSLGenerator generator(subroutines, program_code, swizzle_data, main_offset, inputreg_getter, outputreg_getter, sanitize_mul, is_gs); - return generator.GetShaderCode(); + return generator.MoveShaderCode(); } catch (const DecompileFail& exception) { LOG_ERROR(HW_GPU, "Shader decompilation failed: %s", exception.what()); return boost::none;