Skip to content

Commit

Permalink
Surpress "multiple methods named" error
Browse files Browse the repository at this point in the history
I realize that `collection` won't always be an NSArray, but the cast will let the compiler know to expect a NSUInteger return type instead of `size_t` which is also a return type a method named `count` inside of JSONKit.
  • Loading branch information
soffes committed Nov 17, 2011
1 parent c2ef692 commit c494f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion JSONKit.m
Expand Up @@ -848,7 +848,7 @@ - (void)dealloc
- (NSArray *)allObjects
{
NSParameterAssert(collection != NULL);
NSUInteger count = [collection count], atObject = 0UL;
NSUInteger count = [(NSArray *)collection count], atObject = 0UL;
id objects[count];

while((objects[atObject] = [self nextObject]) != NULL) { NSParameterAssert(atObject < count); atObject++; }
Expand Down

0 comments on commit c494f8d

Please sign in to comment.