d3d12: Fix some warnings

This commit is contained in:
vlj 2015-05-14 19:51:15 +02:00 committed by Vincent Lejeune
parent 3960555e45
commit 16f40fb69c
2 changed files with 5 additions and 7 deletions

View File

@ -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";

View File

@ -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();
}