1
0
Fork 0

Fix "misleading-indentation" warnings

GCC helpfully indicates, that:

warning: this ‘if’ clause does not guard (…) this statement, but
the latter is misleadingly indented as if it were guarded by the ‘if’.

Also, improve readability while we're touching these lines.
This commit is contained in:
Patryk Obara 2019-11-04 06:57:47 +01:00 committed by Patryk Obara
parent 59edc4d9b5
commit 5ff1fcd604

View file

@ -472,17 +472,21 @@ bool mem_unalignedreadd_checked(PhysPt address, Bit32u * val) {
return false;
}
bool mem_unalignedwritew_checked(PhysPt address,Bit16u val) {
if (mem_writeb_checked(address,(Bit8u)(val & 0xff))) return true;val>>=8;
if (mem_writeb_checked(address+1,(Bit8u)(val & 0xff))) return true;
bool mem_unalignedwritew_checked(PhysPt address, Bit16u val) {
if (mem_writeb_checked(address+0, (Bit8u)(val & 0xff))) return true;
val >>= 8;
if (mem_writeb_checked(address+1, (Bit8u)(val & 0xff))) return true;
return false;
}
bool mem_unalignedwrited_checked(PhysPt address,Bit32u val) {
if (mem_writeb_checked(address,(Bit8u)(val & 0xff))) return true;val>>=8;
if (mem_writeb_checked(address+1,(Bit8u)(val & 0xff))) return true;val>>=8;
if (mem_writeb_checked(address+2,(Bit8u)(val & 0xff))) return true;val>>=8;
if (mem_writeb_checked(address+3,(Bit8u)(val & 0xff))) return true;
bool mem_unalignedwrited_checked(PhysPt address, Bit32u val) {
if (mem_writeb_checked(address+0, (Bit8u)(val & 0xff))) return true;
val >>= 8;
if (mem_writeb_checked(address+1, (Bit8u)(val & 0xff))) return true;
val >>= 8;
if (mem_writeb_checked(address+2, (Bit8u)(val & 0xff))) return true;
val >>= 8;
if (mem_writeb_checked(address+3, (Bit8u)(val & 0xff))) return true;
return false;
}