--- parser3/src/include/pa_array.h 2003/03/19 16:28:07 1.57.2.27.2.3 +++ parser3/src/include/pa_array.h 2003/03/20 13:09:53 1.57.2.27.2.4 @@ -8,7 +8,7 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H -static const char* IDENT_ARRAY_H="$Date: 2003/03/19 16:28:07 $"; +static const char* IDENT_ARRAY_H="$Date: 2003/03/20 13:09:53 $"; // includes @@ -26,9 +26,6 @@ template class Array: public protected: - // default expand delta size - int fdelta; - /// elements[growing size] here T *felements; @@ -47,21 +44,13 @@ public: { felements=static_cast(malloc(fallocated*sizeof(T))); } - override ~Array() { - // see comment in ctor - T *last=felements+fused; - for(T *current=felements; current~T(); // manually invoking destructors - - free(felements); - } /// how many items are in Array int count() const { return fused; } /// append to array Array& operator += (T src) { if(is_full()) - expand(fdelta); + expand(2); felements[fused++]=src;