Stylistic fixes

main
ericwa 16 years ago
parent 85c07b836e
commit d56930241e

@ -149,7 +149,7 @@ objc_property_t* class_copyPropertyList(Class cls, unsigned int *outCount)
{ {
if (Nil == cls || !objc_test_class_flag(cls, objc_class_flag_new_abi)) if (Nil == cls || !objc_test_class_flag(cls, objc_class_flag_new_abi))
{ {
if (outCount) { *outCount = 0; } if (NULL != outCount) { *outCount = 0; }
return NULL; return NULL;
} }
struct objc_property_list *properties = cls->properties; struct objc_property_list *properties = cls->properties;
@ -158,7 +158,7 @@ objc_property_t* class_copyPropertyList(Class cls, unsigned int *outCount)
{ {
count += l->count; count += l->count;
} }
if (outCount) if (NULL != outCount)
{ {
*outCount = count; *outCount = count;
} }

@ -158,7 +158,7 @@ class_copyIvarList(Class cls, unsigned int *outCount)
unsigned int index; unsigned int index;
Ivar *list; Ivar *list;
if (cls) if (Nil != cls)
{ {
ivarlist = cls->ivars; ivarlist = cls->ivars;
} }

@ -349,7 +349,7 @@ static SEL objc_register_selector_copy(SEL aSel)
const char *sel_getName(SEL sel) const char *sel_getName(SEL sel)
{ {
if ((SEL)NULL == sel) { return "<null selector>"; } if (NULL == sel) { return "<null selector>"; }
const char *name = sel->name; const char *name = sel->name;
if (isSelRegistered(sel)) if (isSelRegistered(sel))
{ {
@ -395,21 +395,21 @@ BOOL sel_isEqual(SEL sel1, SEL sel2)
SEL sel_registerName(const char *selName) SEL sel_registerName(const char *selName)
{ {
if (NULL == selName) { return (SEL)NULL; } if (NULL == selName) { return NULL; }
struct objc_selector sel = {selName, 0}; struct objc_selector sel = {selName, 0};
return objc_register_selector_copy(&sel); return objc_register_selector_copy(&sel);
} }
SEL sel_registerTypedName_np(const char *selName, const char *types) SEL sel_registerTypedName_np(const char *selName, const char *types)
{ {
if (NULL == selName) { return (SEL)NULL; } if (NULL == selName) { return NULL; }
struct objc_selector sel = {selName, types}; struct objc_selector sel = {selName, types};
return objc_register_selector_copy(&sel); return objc_register_selector_copy(&sel);
} }
const char *sel_getType_np(SEL aSel) const char *sel_getType_np(SEL aSel)
{ {
if ((SEL)NULL == aSel) { return NULL; } if (NULL == aSel) { return NULL; }
return aSel->types; return aSel->types;
} }
@ -517,7 +517,7 @@ void objc_register_selector_array(SEL selectors, unsigned long count)
SEL sel_get_typed_uid (const char *name, const char *types) SEL sel_get_typed_uid (const char *name, const char *types)
{ {
if (NULL == name) { return (SEL)NULL; } if (NULL == name) { return NULL; }
SEL sel = selector_lookup(name, types); SEL sel = selector_lookup(name, types);
if (NULL == sel) { return sel_registerTypedName_np(name, types); } if (NULL == sel) { return sel_registerTypedName_np(name, types); }
@ -534,7 +534,7 @@ SEL sel_get_typed_uid (const char *name, const char *types)
SEL sel_get_any_typed_uid (const char *name) SEL sel_get_any_typed_uid (const char *name)
{ {
if (NULL == name) { return (SEL)NULL; } if (NULL == name) { return NULL; }
SEL sel = selector_lookup(name, 0); SEL sel = selector_lookup(name, 0);
if (NULL == sel) { return sel_registerName(name); } if (NULL == sel) { return sel_registerName(name); }

Loading…
Cancel
Save