Gekko: Make UReg_FPSCR's single argument constructor explicit

Prevent implicit conversions to UReg_FPSCR. Given the semantics of a
random magic value and the FPSCR are different, make explicit
conversions a requirement to signify intent.
This commit is contained in:
Lioncash 2018-05-06 18:41:01 -04:00
parent cb5926c1ca
commit 69a0aaebd4
2 changed files with 2 additions and 2 deletions

View File

@ -475,7 +475,7 @@ union UReg_FPSCR
u32 Hex = 0; u32 Hex = 0;
UReg_FPSCR() = default; UReg_FPSCR() = default;
UReg_FPSCR(u32 hex_) : Hex{hex_} {} explicit UReg_FPSCR(u32 hex_) : Hex{hex_} {}
}; };
// Hardware Implementation-Dependent Register 0 // Hardware Implementation-Dependent Register 0

View File

@ -128,7 +128,7 @@ static void ResetRegisters()
ppcState.spr[SPR_ECID_M] = 0x1840c00d; ppcState.spr[SPR_ECID_M] = 0x1840c00d;
ppcState.spr[SPR_ECID_L] = 0x82bb08e8; ppcState.spr[SPR_ECID_L] = 0x82bb08e8;
ppcState.fpscr = 0; ppcState.fpscr.Hex = 0;
ppcState.pc = 0; ppcState.pc = 0;
ppcState.npc = 0; ppcState.npc = 0;
ppcState.Exceptions = 0; ppcState.Exceptions = 0;