20,8 → 20,6 |
dword get_pos_by_name(); |
void drop(); |
void increase_data_size(); |
dword get_last(); |
bool delete_last(); |
}; |
|
:void collection::increase_data_size() { |
42,10 → 40,7 |
} |
|
:int collection::addn(dword in, len) { |
if (count >= 4000) { |
debugln("collection: more than 4000 elements!"); |
return 0; |
} |
if (count >= 4000) return 0; |
if (element_offset[count]+len+2 > data_size) { |
increase_data_size(); |
addn(in, len); |
62,10 → 57,6 |
return data_start + element_offset[pos]; |
} |
|
:dword collection::get_last() { |
return get(count-1); |
} |
|
:dword collection::get_pos_by_name(dword name) { |
dword i; |
for (i=0; i<count; i++) { |
82,9 → 73,6 |
count = 0; |
} |
|
:bool collection::delete_last() { |
count--; |
} |
|
/*======================================================== |
= = |