mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
add finding elements
This commit is contained in:
parent
0bd92e439a
commit
68e7b3199d
2 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
- (id) removeItemAt: (integer) index;
|
||||
- (id) insertItemAt: (integer) index item:(id) item;
|
||||
- (integer) count;
|
||||
- (integer) findItem: (id) item;
|
||||
-(void)makeObjectsPerformSelector:(SEL)selector;
|
||||
-(void)makeObjectsPerformSelector:(SEL)selector withObject:(id)arg;
|
||||
@end
|
||||
|
|
|
@ -117,6 +117,15 @@
|
|||
return count;
|
||||
}
|
||||
|
||||
- (integer) findItem: (id) item
|
||||
{
|
||||
local integer i;
|
||||
for (i = 0; i < count; i++)
|
||||
if (array[i] == item)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
-(void)makeObjectsPerformSelector:(SEL)selector
|
||||
{
|
||||
local integer i;
|
||||
|
|
Loading…
Reference in a new issue