--- parser3/src/main/Attic/pa_array.C 2001/01/29 16:37:58 1.8 +++ parser3/src/main/Attic/pa_array.C 2001/01/29 17:01:51 1.9 @@ -1,5 +1,5 @@ /* - $Id: pa_array.C,v 1.8 2001/01/29 16:37:58 paf Exp $ + $Id: pa_array.C,v 1.9 2001/01/29 17:01:51 paf Exp $ */ #include @@ -7,13 +7,11 @@ #include "pa_pool.h" #include "pa_array.h" -template -void *Array::operator new(size_t size, Pool *apool) { +void *Array::operator new(size_t size, Pool *apool) { return apool->malloc(size); } -template -Array::Array(Pool *apool, int initial_rows) : +Array::Array(Pool *apool, int initial_rows) : pool(apool) { head=tail=static_cast( pool->malloc(sizeof(int)+sizeof(Chunk::Row)*initial_rows+sizeof(Chunk *))); @@ -27,8 +25,7 @@ Array::Array(Pool *apool, int init cache_chunk=head; } -template -void Array::expand(int chunk_rows) { +void Array::expand(int chunk_rows) { Chunk *chunk=tail=static_cast( pool->malloc(sizeof(int)+sizeof(Chunk::Row)*chunk_rows+sizeof(Chunk *))); chunk->count=chunk_rows; @@ -39,8 +36,7 @@ void Array::expand(int chunk_rows) } -template -Array& Array::operator += (Item src) { +Array& Array::operator += (Item src) { if(chunk_is_full()) expand(tail->count*CR_GROW_PERCENT/100); @@ -50,8 +46,7 @@ Array& Array::operator += (I return *this; } -template -Item& Array::operator [] (int index) { +Array::Item& Array::operator [] (int index) { if(!(index>=0 && index::operator [] (int inde return cache_chunk->rows[index-cache_chunk_base].item; } -template -Array& Array::operator += (Array& src) { +Array& Array::operator += (Array& src) { int src_used_rows=src.fused_rows; int last_chunk_rows_left=link_row-append_here;