git @ Cat's Eye Technologies linapple / 618cfad
NULL IS NOT 0! Fixed a few "not_pointer != NULL || false" constructs. First, you never need to "|| false" anything to indicate that something false if it is not true, because if it is not true, by definition, it's false. In several of these cases it looks like we're honestly comparing macro constants we've #define'd with 0 and returning true regardless, but whatever for the moment since maybe that's part of the brutal port to Linux of a Windows emulator and maybe if we support emulating the right hardware in the future it might not always be hardcoded. I put the assignment of a comparison in parentheses for readability. Didn't bother for the returns. T. Joseph Carter 3 years ago
3 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
520520 MB_SetSoundcardType((eSOUNDCARDTYPE)dwTmp);
521521
522522 if(LOAD(TEXT(REGVALUE_SAVE_STATE_ON_EXIT), &dwTmp))
523 g_bSaveStateOnExit = dwTmp != NULL || false;
523 g_bSaveStateOnExit = (dwTmp != 0);
524524
525525 if(LOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp)) hddenabled = (bool) dwTmp;// after MemInitialize
526526 // HD_SetEnabled(dwTmp ? true : false);
844844
845845 bool MemCheckSLOTCXROM()
846846 {
847 return SW_SLOTCXROM != NULL || false;
847 return SW_SLOTCXROM != 0;
848848 }
849849
850850 //===========================================================================
21742174
21752175 bool VideoGetSW80COL()
21762176 {
2177 return SW_80COL != NULL || false;
2177 return SW_80COL != 0;
21782178 }
21792179
21802180 //===========================================================================