summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-09-04 01:57:11 +0300
committerTor Lillqvist <tml@collabora.com>2013-09-04 01:57:54 +0300
commitf1dd6b8d6221ef4da982cc9e10a761df52ab2310 (patch)
tree0e5ac5a656edfe082566ec4c9e5bd4a7b06ae34c /xmlsecurity
parentaa4868de78b3a3893722f7a079f4d05e18abd8db (diff)
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
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/framework/buffernode.cxx32
-rw-r--r--xmlsecurity/source/framework/buffernode.hxx1
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx7
3 files changed, 0 insertions, 40 deletions
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index 64a5a516a5bf..bea9a958f740 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -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 ************************************
*
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index 8685d7f6282a..a6468e4e65e0 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -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();
};
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index afe98c50715f..c79ee65af7b3 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -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
*/