Closed MaddTheSane closed 9 years ago
Thanks for this! I actually only found out about NS_ENUM and NS_OPTIONS this weekend while I was digging into Swift development. I was planning to migrate my old code to them, so you've saved me a bunch of work.
I believe NS_ENUM and NS_OPTIONS were introduced in 10.8
Yup, seems that way according to mattt: http://nshipster.com/ns_enum-ns_options/
There are some enum
s I didn't do, particularly those in the DOSBox app proper.
I also only did a few of the enums in the printer source files, as I wasn't 100% sure about the size (if any) the values were supposed to be.
I also skipped over the JoypadCocoa headers because the source isn't being compiled, and thus the size might be different then that being linked.
Yeah, I prefer to keep Boxer's modification of external sources (including DOSBox's) to a minimum, as that makes diffing and merging that much less harrowing when the time comes to update those sources.
This pull request changes many C-style
enum
s to useNS_ENUM
orNS_OPTIONS
. This is type-safe and compatible with Swift, should Boxer ever migrate to 64-bit.I forgot when they were introduced, but they should be buildable to any version of OS X, provided
NS_ENUM
andNS_OPTIONS
are defined.