зеркало из https://github.com/mozilla/pjs.git
[NSArray lastObject] is already defined; no need for our own version.
This commit is contained in:
Родитель
40f98299ee
Коммит
7038613018
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче