mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-08 12:22:34 +00:00
[NSArray lastObject] is already defined; no need for our own version.
This commit is contained in:
parent
b711a5bc3a
commit
924ce23fb5
@ -41,7 +41,6 @@
|
||||
@interface NSArray(CaminoNSArrayUtils)
|
||||
|
||||
- (id)firstObject;
|
||||
- (id)lastObject;
|
||||
|
||||
// just returns nil if out of range, rather than throwing.
|
||||
- (id)safeObjectAtIndex:(unsigned)inIndex;
|
||||
|
@ -47,14 +47,6 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)lastObject
|
||||
{
|
||||
if ([self count] > 0)
|
||||
return [self objectAtIndex:[self count] - 1];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)safeObjectAtIndex:(unsigned)inIndex
|
||||
{
|
||||
return (inIndex < [self count]) ? [self objectAtIndex:inIndex] : nil;
|
||||
|
Loading…
Reference in New Issue
Block a user