mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
Fixed: subclasses of CPMutableArray had broken removeObject:.
The `removeObject:` default provided in CPMutableArray would not work in subclasses because it relied on the class having a .length property.
This commit is contained in:
1 parent
4188b274f7
commit
c4370240f8
2 files changed
+13
-2
No files matched your search
@@ -218,7 +218,7 @@
|
||||
*/
|
||||
- (void)removeObject:(id)anObject
|
||||
{
|
||||
[self removeObject:anObject inRange:CPMakeRange(0, self.length)];
|
||||
[self removeObject:anObject inRange:CPMakeRange(0, [self count])];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -233,7 +233,7 @@
|
||||
while ((index = [self indexOfObject:anObject inRange:aRange]) != CPNotFound)
|
||||
{
|
||||
[self removeObjectAtIndex:index];
|
||||
aRange = CPIntersectionRange(CPMakeRange(index, self.length - index), aRange);
|
||||
aRange = CPIntersectionRange(CPMakeRange(index, [self count] - index), aRange);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user