OK, I think I need caffeine. This time, the Array class is really switched

over to using ids.
This commit is contained in:
Brian Koropoff 2003-05-23 04:38:08 +00:00
parent 3205f0f672
commit c5be2fb501
2 changed files with 13 additions and 13 deletions

View file

@ -12,12 +12,12 @@
- (id) init;
- (id) initWithIncrement: (integer) inc;
- (void) free;
- (void []) getItemAt: (integer) index;
- (void) setItemAt: (integer) index item:(void []) item;
- (void) addItem: (void []) item;
- (void) removeItem: (void []) item;
- (void []) removeItemAt: (integer) index;
- (void []) insertItemAt: (integer) index item:(void []) item;
- (id) getItemAt: (integer) index;
- (void) setItemAt: (integer) index item:(id) item;
- (void) addItem: (id) item;
- (void) removeItem: (id) item;
- (id) removeItemAt: (integer) index;
- (id) insertItemAt: (integer) index item:(id) item;
- (integer) count;
@end

View file

@ -26,7 +26,7 @@
obj_free (array);
}
- (void []) getItemAt: (integer) index
- (id) getItemAt: (integer) index
{
if (index == -1)
index = count - 1;
@ -35,7 +35,7 @@
return array[index];
}
- (void) setItemAt: (integer) index item: (void []) item
- (void) setItemAt: (integer) index item: (id) item
{
if (index == -1)
index = count - 1;
@ -44,7 +44,7 @@
array[index] = item;
}
- (void) addItem: (void []) item
- (void) addItem: (id) item
{
if (count == size) {
size += incr;
@ -53,7 +53,7 @@
array[count++] = item;
}
- (void) removeItem: (void []) item
- (void) removeItem: (id) item
{
local integer i, n;
@ -66,10 +66,10 @@
return;
}
- (void []) removeItemAt: (integer) index
- (id) removeItemAt: (integer) index
{
local integer i;
local void [] item;
local id item;
if (index == -1)
index = count -1;
@ -82,7 +82,7 @@
return item;
}
- (void []) insertItemAt: (integer) index item:(void []) item
- (id) insertItemAt: (integer) index item:(id) item
{
local integer i;
if (index == -1)