linappleii / linapple

Apple 2e emulator
GNU General Public License v2.0
136 stars 61 forks source link

PR 154 incorrectly uses FALSE instead of 'false' #172

Closed akhepcat closed 3 years ago

akhepcat commented 3 years ago

Just tried a quick git pull && make

and then get this:

src/CPU.cpp: In function ‘DWORD Cpu65C02(DWORD)’: src/CPU.cpp:870:29: error: ‘FALSE’ was not declared in this scope 870 | BOOL bSlowerOnPagecross = FALSE; // Set if opcode writes to memory (eg. ASL, STA) | ^~~~~ src/CPU.cpp: In function ‘DWORD Cpu6502(DWORD)’: src/CPU.cpp:2166:29: error: ‘FALSE’ was not declared in this scope 2166 | BOOL bSlowerOnPagecross = FALSE; // Set if opcode writes to memory (eg. ASL, STA) | ^~~~~ make: *** [Makefile:129: build/obj/CPU.o] Error 1

FALSE is not defined in any files within the project.

those should probably be lower-case'd to comply with the standard conventions

nerun commented 3 years ago

This was merged today, but CPU.cpp failed to compile. To fix it change: FALSE to false in lines 870 and 2166.

akhepcat commented 3 years ago

FALSE is a win32/64 macro, to be equivalent to the win32/64 'c' macro

false is the c++ standard equivalent everywhere.

Since the source is portable c++, folk submitting patches need to be wary of including OS-specific defines, and use the standards where available. Only where there are conflicts should there be workarounds (e.g., "wincompat.h")

akhepcat commented 3 years ago

latest commits (based on above) resolves the error