--- parser3/src/include/pa_stack.h 2004/02/11 15:33:14 1.22 +++ parser3/src/include/pa_stack.h 2005/03/16 14:37:51 1.23 @@ -8,7 +8,7 @@ #ifndef PA_STACK_H #define PA_STACK_H -static const char * const IDENT_STACK_H="$Date: 2004/02/11 15:33:14 $"; +static const char * const IDENT_STACK_H="$Date: 2005/03/16 14:37:51 $"; #include "pa_config_includes.h" #include "pa_array.h" @@ -20,7 +20,7 @@ public: Stack(): ftop(0) {} void push(T item) { - if(ftopcount()) // cell is already allocated? put(ftop, item); // use it else *this+=item; // append it @@ -28,7 +28,7 @@ public: } T pop() { - return get(--ftop); + return this->get(--ftop); } bool is_empty() { return ftop==0; } @@ -36,13 +36,13 @@ public: void set_top_index(size_t atop) { ftop=atop; } T top_value() { assert(!is_empty()); - return get(ftop-1); + return this->get(ftop-1); } /// call this prior to collecting garbage [in unused part of stack there may be pointers(unused)] void wipe_unused() { - if(size_t above_top_size=fused-ftop) - memset(&felements[ftop], 0, above_top_size*sizeof(T)); + if(size_t above_top_size=this->fused-ftop) + memset(&this->felements[ftop], 0, above_top_size*sizeof(T)); } protected: