mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +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) removeItemAt: (integer) index;
|
||||||
- (id) insertItemAt: (integer) index item:(id) item;
|
- (id) insertItemAt: (integer) index item:(id) item;
|
||||||
- (integer) count;
|
- (integer) count;
|
||||||
|
- (integer) findItem: (id) item;
|
||||||
-(void)makeObjectsPerformSelector:(SEL)selector;
|
-(void)makeObjectsPerformSelector:(SEL)selector;
|
||||||
-(void)makeObjectsPerformSelector:(SEL)selector withObject:(id)arg;
|
-(void)makeObjectsPerformSelector:(SEL)selector withObject:(id)arg;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -117,6 +117,15 @@
|
||||||
return count;
|
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
|
-(void)makeObjectsPerformSelector:(SEL)selector
|
||||||
{
|
{
|
||||||
local integer i;
|
local integer i;
|
||||||
|
|
Loading…
Reference in a new issue