[NSArray lastObject] is already defined; no need for our own version.

This commit is contained in:
smfr%smfr.org 2005-11-13 04:48:33 +00:00
parent b711a5bc3a
commit 924ce23fb5
2 changed files with 0 additions and 9 deletions

View File

@ -41,7 +41,6 @@
@interface NSArray(CaminoNSArrayUtils) @interface NSArray(CaminoNSArrayUtils)
- (id)firstObject; - (id)firstObject;
- (id)lastObject;
// just returns nil if out of range, rather than throwing. // just returns nil if out of range, rather than throwing.
- (id)safeObjectAtIndex:(unsigned)inIndex; - (id)safeObjectAtIndex:(unsigned)inIndex;

View File

@ -47,14 +47,6 @@
return nil; return nil;
} }
- (id)lastObject
{
if ([self count] > 0)
return [self objectAtIndex:[self count] - 1];
return nil;
}
- (id)safeObjectAtIndex:(unsigned)inIndex - (id)safeObjectAtIndex:(unsigned)inIndex
{ {
return (inIndex < [self count]) ? [self objectAtIndex:inIndex] : nil; return (inIndex < [self count]) ? [self objectAtIndex:inIndex] : nil;