diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-06-09 01:27:43 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-06-09 01:27:43 +0200 |
commit | 0d53cde185eb6c3e8e6096c842dbd672b44076a6 (patch) | |
tree | 888baeff179552b34da61055f62448c685c78669 /xmlsecurity | |
parent | 3cf78fa315b84d866e643b93d0083b38bc8dab8c (diff) |
Some cppcheck cleaning
Change-Id: I9463f36bd61ee2d74be3d435adae9912cf411c97
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/framework/buffernode.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx index a7c0a24f33df..042c3e971635 100644 --- a/xmlsecurity/source/framework/buffernode.cxx +++ b/xmlsecurity/source/framework/buffernode.cxx @@ -317,7 +317,7 @@ bool BufferNode::hasAnything() const * Email: michael.mi@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@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@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 c416d383e591..c1f18c2735f0 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; |