![]() |
|
Unnecessary double check? - Printable Version +- VBA-M Forums (http://vba-m.com/forum) +-- Forum: VisualBoy Advance-M (/Forum-visualboy-advance-m) +--- Forum: Suggestions (/Forum-suggestions) +---- Forum: Core (/Forum-core--44) +---- Thread: Unnecessary double check? (/Thread-unnecessary-double-check) |
Unnecessary double check? - spacy51 - 08-18-2009 07:47 AM gba.cpp, Ln 2645: Quote: case 0xC6: My personal logic tells me that the bold part is unneeded. RE: Unnecessary double check? - jbo_85 - 08-18-2009 09:12 AM The bold part is needed. It fails if DM1CNT_H or value is >= 0x8000. RE: Unnecessary double check? - spacy51 - 08-18-2009 10:13 AM Look at the beginning. start is only true if bit 15 of value is set, so it does not make sense to seperately check for that again in the bold part. RE: Unnecessary double check? - jbo_85 - 08-18-2009 10:18 AM (08-18-2009 10:13 AM)spacy51 Wrote: Look at the beginning.It tests bit 15 of (DM1CNT_H ^ value) and not just bit 15 of value. |