C-style cast cleanup VI

This commit is contained in:
Nekotekina 2019-12-04 01:34:23 +03:00
parent d973835bef
commit 377e7d2a73
41 changed files with 520 additions and 484 deletions

View file

@ -213,7 +213,7 @@ std::string FragmentProgramDecompiler::AddConst()
return name;
}
auto data = (be_t<u32>*) ((char*)m_prog.addr + m_size + 4 * u32{sizeof(u32)});
auto data = reinterpret_cast<be_t<u32>*>(static_cast<char*>(m_prog.addr) + m_size + 4 * sizeof(u32));
m_offset = 2 * 4 * sizeof(u32);
u32 x = GetData(data[0]);
u32 y = GetData(data[1]);
@ -1072,7 +1072,7 @@ bool FragmentProgramDecompiler::handle_tex_srb(u32 opcode)
std::string FragmentProgramDecompiler::Decompile()
{
auto data = (be_t<u32>*) m_prog.addr;
auto data = static_cast<be_t<u32>*>(m_prog.addr);
m_size = 0;
m_location = 0;
m_loop_count = 0;