[Libreoffice-commits] core.git: xmlsecurity/source
Tor Lillqvist
tml at collabora.com
Tue Sep 3 15:58:41 PDT 2013
xmlsecurity/source/framework/buffernode.cxx | 32 --------------------
xmlsecurity/source/framework/buffernode.hxx | 1
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 7 ----
3 files changed, 40 deletions(-)
New commits:
commit f1dd6b8d6221ef4da982cc9e10a761df52ab2310
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Sep 4 01:57:11 2013 +0300
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
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index 64a5a51..bea9a958 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 at 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 8685d7f..a6468e4 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 afe98c5..c79ee65 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
*/
More information about the Libreoffice-commits
mailing list