[Libreoffice-commits] .: xmlsecurity/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Fri Jun 8 16:28:52 PDT 2012
xmlsecurity/source/framework/buffernode.cxx | 8 ++++----
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 7 +++----
2 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 0d53cde185eb6c3e8e6096c842dbd672b44076a6
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jun 9 01:27:43 2012 +0200
Some cppcheck cleaning
Change-Id: I9463f36bd61ee2d74be3d435adae9912cf411c97
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index a7c0a24..042c3e9 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -317,7 +317,7 @@ bool BufferNode::hasAnything() const
* Email: michael.mi at sun.com
******************************************************************************/
{
- return (m_pBlocker != NULL || m_vElementCollectors.size() > 0);
+ return (m_pBlocker || !m_vElementCollectors.empty());
}
bool BufferNode::hasChildren() const
@@ -344,7 +344,7 @@ bool BufferNode::hasChildren() const
* Email: michael.mi at sun.com
******************************************************************************/
{
- return (m_vChildren.size() > 0);
+ return (!m_vChildren.empty());
}
std::vector< const BufferNode* >* BufferNode::getChildren() const
@@ -378,7 +378,7 @@ const BufferNode* BufferNode::getFirstChild() const
{
BufferNode* rc = NULL;
- if (m_vChildren.size() > 0)
+ if (!m_vChildren.empty())
{
rc = (BufferNode*)m_vChildren.front();
}
@@ -853,7 +853,7 @@ void BufferNode::elementCollectorNotify()
* Email: michael.mi at sun.com
******************************************************************************/
{
- if (m_vElementCollectors.size()>0)
+ if (!m_vElementCollectors.empty())
{
cssxc::sax::ElementMarkPriority nMaxPriority = cssxc::sax::ElementMarkPriority_MINIMUM;
cssxc::sax::ElementMarkPriority nPriority;
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index c416d38..c1f18c2 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -161,8 +161,7 @@ BufferNode* SAXEventKeeperImpl::addNewElementMarkBuffers()
{
BufferNode* pBufferNode = NULL;
- if ( (m_vNewElementCollectors.size()>0) ||
- (m_pNewBlocker != NULL))
+ if (m_pNewBlocker || !m_vNewElementCollectors.empty() )
{
/*
* When the current BufferNode is right pointing to the current
@@ -202,7 +201,7 @@ BufferNode* SAXEventKeeperImpl::addNewElementMarkBuffers()
m_pNewBlocker = NULL;
}
- if (m_vNewElementCollectors.size()>0)
+ if (!m_vNewElementCollectors.empty())
{
std::vector< const ElementCollector* >::const_iterator ii = m_vNewElementCollectors.begin();
@@ -713,7 +712,7 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
******************************************************************************/
{
m_bIsReleasing = true;
- while (m_vReleasedElementMarkBuffers.size()>0)
+ while (!m_vReleasedElementMarkBuffers.empty())
{
std::vector< sal_Int32 >::iterator pId = m_vReleasedElementMarkBuffers.begin();
sal_Int32 nId = *pId;
More information about the Libreoffice-commits
mailing list