diff --git a/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.cpp index ac2bc0e078..11b925753e 100644 --- a/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.cpp @@ -410,14 +410,14 @@ std::string VertexDecompiler::BuildCode() lvl -= m_instructions[i].close_scopes; if (lvl < 1) lvl = 1; //assert(lvl >= 1); - for (uint j = 0; j < m_instructions[i].put_close_scopes; ++j) + for (int j = 0; j < m_instructions[i].put_close_scopes; ++j) { --lvl; if (lvl < 1) lvl = 1; main_body.append(lvl, '\t') += "}\n"; } - for (uint j = 0; j < m_instructions[i].do_count; ++j) + for (int j = 0; j < m_instructions[i].do_count; ++j) { main_body.append(lvl, '\t') += "do\n"; main_body.append(lvl, '\t') += "{\n"; diff --git a/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.h b/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.h index 86cbf2e33e..f141effdd0 100644 --- a/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.h +++ b/rpcs3/Emu/RSX/D3D12/VertexProgramDecompiler.h @@ -81,9 +81,8 @@ struct ParamArray } else { - const u32 num = params[flag].size(); params[flag].emplace_back(flag, type); - params[flag][num].items.emplace_back(name, -1, value); + params[flag].back().items.emplace_back(name, -1, value); } return name; @@ -99,9 +98,8 @@ struct ParamArray } else { - const u32 num = params[flag].size(); params[flag].emplace_back(flag, type); - params[flag][num].items.emplace_back(name, location); + params[flag].back().items.emplace_back(name, location); } return name; @@ -136,7 +134,7 @@ public: } } - int get_vector_size() const + size_t get_vector_size() const { return swizzles[swizzles.size() - 1].length(); }