diff --git a/src/internal/ElemStack.cpp b/src/internal/ElemStack.cpp index 7c1030704a89a5dc8fe1d9f949684b0dc97f5c09..2e65d7e4ae72278e46f6908427e225645ae20512 100644 --- a/src/internal/ElemStack.cpp +++ b/src/internal/ElemStack.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.17 2001/12/12 14:29:50 tng + * Remove obsolete code in ElemStack which can help performance. + * * Revision 1.16 2001/08/29 16:42:27 tng * No need to new the child QName in ElemStack addChild. Remove it for performance gain. * @@ -185,11 +188,6 @@ unsigned int ElemStack::addLevel() fStack[fStackTop]->fMapCapacity = 0; fStack[fStackTop]->fMap = 0; } - else - { - // Cleanup the old element before reuse - unsigned int childCount = fStack[fStackTop]->fChildCount; - } // Set up the new top row fStack[fStackTop]->fThisElement = 0; @@ -224,11 +222,6 @@ ElemStack::addLevel(XMLElementDecl* const toSet, const unsigned int readerNum) fStack[fStackTop]->fMapCapacity = 0; fStack[fStackTop]->fMap = 0; } - else - { - // Cleanup the old element before reuse - unsigned int childCount = fStack[fStackTop]->fChildCount; - } // Set up the new top row fStack[fStackTop]->fThisElement = 0; @@ -252,18 +245,6 @@ ElemStack::addLevel(XMLElementDecl* const toSet, const unsigned int readerNum) -const XMLElementDecl& ElemStack::elemAt(const unsigned int index) const -{ - if (!fStackTop) - ThrowXML(EmptyStackException, XMLExcepts::ElemStack_EmptyStack); - - if (index >= fStack[fStackTop-1]->fChildCount) - ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::ElemStack_BadIndex); - - return *(fStack[fStackTop-1]->fThisElement); -} - - const ElemStack::StackElem* ElemStack::popTop() { // Watch for an underflow error diff --git a/src/internal/ElemStack.hpp b/src/internal/ElemStack.hpp index cfb50d8ddb6e40f31fefe4e66e205b413edd920b..7e17b9979fa768756946fe93545ec9ed5599e497 100644 --- a/src/internal/ElemStack.hpp +++ b/src/internal/ElemStack.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.11 2001/12/12 14:29:50 tng + * Remove obsolete code in ElemStack which can help performance. + * * Revision 1.10 2001/08/07 13:47:47 tng * Schema: Fix unmatched end tag for qualified/unqualifed start tag. * @@ -205,8 +208,6 @@ public : // ----------------------------------------------------------------------- unsigned int addLevel(); unsigned int addLevel(XMLElementDecl* const toSet, const unsigned int readerNum); - XMLElementDecl& elemAt(const unsigned int index); - const XMLElementDecl& elemAt(const unsigned int index) const; const StackElem* popTop();