You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameter key and value constants defined in SDLNames.h should use extern instead of define for safe compile time type checking and to avoid collisions.
Define constants for strings used for such purposes as notification names and dictionary keys. By using string constants, you are ensuring that the compiler verifies the proper value is specified (that is, it performs spell checking).
The text was updated successfully, but these errors were encountered:
Along with #7 I think this is part of a general overhaul of constants that may also include SDLEnums to be considered for making the library more internally consistent and consistent with platform best practices.
joeljfischer
changed the title
SDLNames constants should use const instead of define
Use Constants instead of #define
Jan 16, 2015
Additionally, these defines cause greater memory use because a new string is instantiated every time the macro is used; with constants only one string would be used.
The parameter key and value constants defined in SDLNames.h should use extern instead of define for safe compile time type checking and to avoid collisions.
Apple's Recommendation suggests
The text was updated successfully, but these errors were encountered: