mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 04:00:42 +00:00
Updated CPObject's instancesRespondToSelector to return BOOL
This commit is contained in:
1 parent
0508c54799
commit
46a975b966
2 files changed
+3
-3
No files matched your search
@@ -674,7 +674,7 @@
|
||||
*/
|
||||
- (CPArray)arrayByAddingObject:(id)anObject
|
||||
{
|
||||
if (!anObject)
|
||||
if (anObject === nil || anObject === undefined)
|
||||
[CPException raise:CPInvalidArgumentException
|
||||
reason:"arrayByAddingObject: object can't be nil"];
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
*/
|
||||
+ (BOOL)instancesRespondToSelector:(SEL)aSelector
|
||||
{
|
||||
return class_getInstanceMethod(self, aSelector);
|
||||
return !!class_getInstanceMethod(self, aSelector);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -187,7 +187,7 @@
|
||||
*/
|
||||
- (BOOL)respondsToSelector:(SEL)aSelector
|
||||
{
|
||||
return class_getInstanceMethod(isa, aSelector) != NULL;
|
||||
return !!class_getInstanceMethod(isa, aSelector);
|
||||
}
|
||||
|
||||
// Obtaining method information
|
||||
|
||||
Reference in new issue
Block a user