--- parser3/src/include/pa_array.h 2009/04/17 13:13:09 1.72 +++ parser3/src/include/pa_array.h 2009/04/29 03:26:38 1.76 @@ -8,7 +8,7 @@ #ifndef PA_ARRAY_H #define PA_ARRAY_H -static const char * const IDENT_ARRAY_Y="$Date: 2009/04/17 13:13:09 $"; +static const char * const IDENT_ARRAY_Y="$Date: 2009/04/29 03:26:38 $"; // includes @@ -83,9 +83,12 @@ public: felements=fallocated?static_cast(malloc(fallocated*sizeof(T))):0; } - ~Array(){ - free(felements); +#ifdef USE_DESTRUCTORS + inline ~Array(){ + if(felements) + free(felements); } +#endif /// how many items are in Array inline size_t count() const { return fused; } @@ -192,6 +195,10 @@ public: return T(0); } + inline T* ptr(size_t index){ + return felements + index; + } + protected: bool is_full() {