Kaydet (Commit) f1dd6b8d authored tarafından Tor Lillqvist's avatar Tor Lillqvist

WaE: 'BufferNode::notifyAncestor': recursive call has no side effects

Interesting function that just traverses a chain of objects using
recursion, but does nothing at all otherwise. Kill it. But at least it
had an Enterprise Ready block comment in front.

Change-Id: If2296d2534cb9451d4ceadaf966b8c70f0a17557
üst aa4868de
......@@ -788,38 +788,6 @@ void BufferNode::notifyBranch()
}
}
void BufferNode::notifyAncestor()
/****** BufferNode/notifyAncestor ********************************************
*
* NAME
* notifyAncestor -- notifies each ancestor BufferNode through the parent
* link.
*
* SYNOPSIS
* notifyAncestor();
*
* FUNCTION
* see NAME
*
* INPUTS
* empty
*
* RESULT
* empty
*
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
******************************************************************************/
{
BufferNode* pParent = m_pParent;
while (pParent != NULL)
{
pParent->notifyAncestor();
pParent = (BufferNode*)pParent->getParent();
}
}
void BufferNode::elementCollectorNotify()
/****** BufferNode/elementCollectorNotify ************************************
*
......
......@@ -113,7 +113,6 @@ public:
void setXMLElement(const com::sun::star::uno::Reference<
com::sun::star::xml::wrapper::XXMLElementWrapper >& xXMLElement);
void notifyBranch();
void notifyAncestor();
void elementCollectorNotify();
void freeAllChildren();
};
......
......@@ -722,8 +722,6 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
ElementCollector* pElementCollector = (ElementCollector*)pElementMark;
cssxc::sax::ElementMarkPriority nPriority = pElementCollector->getPriority();
bool bToModify = pElementCollector->getModify();
/*
* Delete the EC from the buffer node.
*/
......@@ -735,11 +733,6 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
pBufferNode->notifyBranch();
}
if (bToModify)
{
pBufferNode->notifyAncestor();
}
/*
* delete the ElementMark
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment