--- parser3/src/main/Attic/pa_array.C 2001/01/29 20:10:32 1.10 +++ parser3/src/main/Attic/pa_array.C 2001/01/30 13:07:31 1.12 @@ -1,12 +1,11 @@ /* - $Id: pa_array.C,v 1.10 2001/01/29 20:10:32 paf Exp $ + $Id: pa_array.C,v 1.12 2001/01/30 13:07:31 paf Exp $ */ #include #include "pa_pool.h" #include "pa_array.h" -#include "pa_error.h" void *Array::operator new(size_t size, Pool& apool) { return apool.malloc(size); @@ -37,7 +36,7 @@ void Array::expand(int chunk_rows) { } -Array& Array::operator += (Item *src) { +Array& Array::operator += (const Item *src) { if(chunk_is_full()) expand(tail->count*CR_GROW_PERCENT/100); @@ -47,9 +46,10 @@ Array& Array::operator += (Item *src) { return *this; } -Array::Item *Array::get(int index) { +const Array::Item *Array::get(int index) const { if(!(index>=0 && indexrows[index-cache_chunk_base].item; } -Array& Array::append_array(Array& src) { +Array& Array::append_array(const Array& src) { int src_used_rows=src.fused_rows; int last_chunk_rows_left=link_row-append_here;