--- parser3/src/include/pa_stack.h 2003/02/17 15:34:19 1.17.2.4 +++ parser3/src/include/pa_stack.h 2003/03/04 15:59:18 1.17.2.6 @@ -8,7 +8,7 @@ #ifndef PA_STACK_H #define PA_STACK_H -static const char* IDENT_STACK_H="$Date: 2003/02/17 15:34:19 $"; +static const char* IDENT_STACK_H="$Date: 2003/03/04 15:59:18 $"; #include "pa_config_includes.h" #include "pa_array.h" @@ -26,9 +26,12 @@ public: *this+=item; // append it ftop++; } + + /// @test to think: freeing unused stack item right now, may no do that? + /// [delay that till next push?] T pop() { T result=get(--ftop); - put(ftop, T()); + put(ftop, empty); return result; } @@ -40,7 +43,7 @@ private: // deepest used index int ftop; - + T empty; }; #endif