Created
April 13, 2017 23:22
-
-
Save Raztor0/77dc35605c67d10f63e1e03e2366ab85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef CONFIG_DEBUG | |
static inline id _SKNonnullScreenGlobalForKey(id self, SEL _cmd, SKScreenGlobals * aGlobals, NSString * key) { | |
NSParameterAssert(self != nil); | |
NSParameterAssert(_cmd != NULL); | |
NSParameterAssert(aGlobals != nil); | |
NSParameterAssert(key != nil); | |
id object = [aGlobals objectForKey:key]; | |
NSAssert(object != nil, @"%@ expects the screen global for key %@ to be set.", NSStringFromClass([self class]), key); | |
return object; | |
} | |
#define SKNonnullScreenGlobalForKey(key) _SKNonnullScreenGlobalForKey(self, _cmd, aGlobals, key) | |
#else | |
#define SKNonnullScreenGlobalForKey(key) [aGlobals objectForKey:key] | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment