mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 20:20:44 +00:00
Added removeObjectsInArray: convinience method to CPMutableSet.
Reviewed by me.
This commit is contained in:
1 parent
bfcb94a844
commit
9bb9db760e
1 file changed
+13
-5
+13
-5
@@ -380,12 +380,12 @@
|
||||
Adds to the receiver each object contained in a given array that is not already a member.
|
||||
@param array An array of objects to add to the receiver.
|
||||
*/
|
||||
- (void)addObjectsFromArray:(CPArray)array
|
||||
- (void)addObjectsFromArray:(CPArray)objects
|
||||
{
|
||||
for (var i = 0, count = array.length; i < count; i++)
|
||||
{
|
||||
[self addObject:array[i]];
|
||||
}
|
||||
var count = [objects count];
|
||||
|
||||
while (count--)
|
||||
[self addObject:objects[count]];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -401,6 +401,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)removeObjectsInArray:(CPArray)objects
|
||||
{
|
||||
var count = [objects count];
|
||||
|
||||
while (count--)
|
||||
[self removeObject:objects[count]];
|
||||
}
|
||||
|
||||
/*
|
||||
Empties the receiver of all of its members.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user