Skip to content

Commit

Permalink
Merge pull request #4259 from lioncash/cast
Browse files Browse the repository at this point in the history
PPCAnalyst: Get rid of two casts
  • Loading branch information
lioncash committed Sep 29, 2016
2 parents a714460 + e1705ba commit 74290e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core/PowerPC/PPCAnalyst.cpp
Expand Up @@ -92,7 +92,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
if (func.size >= CODEBUFFER_SIZE * 4) // weird
return false;

UGeckoInstruction instr = (UGeckoInstruction)PowerPC::HostRead_U32(addr);
const UGeckoInstruction instr = PowerPC::HostRead_Instruction(addr);
if (max_size && func.size > max_size)
{
func.address = startAddr;
Expand Down Expand Up @@ -269,7 +269,7 @@ static void FindFunctionsFromBranches(u32 startAddr, u32 endAddr, SymbolDB* func
{
for (u32 addr = startAddr; addr < endAddr; addr += 4)
{
UGeckoInstruction instr = (UGeckoInstruction)PowerPC::HostRead_U32(addr);
const UGeckoInstruction instr = PowerPC::HostRead_Instruction(addr);

if (PPCTables::IsValidInstruction(instr))
{
Expand Down

0 comments on commit 74290e8

Please sign in to comment.