Skip to content
Snippets Groups Projects
Commit 76a0455d authored by Tinny Ng's avatar Tinny Ng
Browse files

Remove obsolete code in ElemStack which can help performance.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173373 13f79535-47bb-0310-9956-ffa450edef68
parent 79ec7c5d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment