diff options
author | Kayo Hamid <kayo.hamid@gekkolinux.com.br> | 2011-04-22 23:40:55 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-04-26 15:25:15 +0100 |
commit | 774ab34f391efbc1728ff652e0b504466e084dd0 (patch) | |
tree | f3019f099871f95dd11222a58e201e53c0afb7d6 /xmlsecurity/source | |
parent | 1ec8d2c26f05fd1e84603cf0188a42e17c4195c1 (diff) |
inefficient emptiness check
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/framework/buffernode.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx index 0f4f2aa5080b..3761b27fc090 100644 --- a/xmlsecurity/source/framework/buffernode.cxx +++ b/xmlsecurity/source/framework/buffernode.cxx @@ -325,7 +325,7 @@ bool BufferNode::hasAnything() const * Email: michael.mi@sun.com ******************************************************************************/ { - return (m_pBlocker != NULL || m_vElementCollectors.size() > 0); + return (m_pBlocker != NULL || !m_vElementCollectors.empty()); } bool BufferNode::hasChildren() const @@ -352,7 +352,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 @@ -386,7 +386,7 @@ const BufferNode* BufferNode::getFirstChild() const { BufferNode* rc = NULL; - if (m_vChildren.size() > 0) + if (!m_vChildren.empty()) { rc = (BufferNode*)m_vChildren.front(); } @@ -895,7 +895,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 a7bb8b8d4e60..99f2d60f3258 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -163,7 +163,7 @@ BufferNode* SAXEventKeeperImpl::addNewElementMarkBuffers() { BufferNode* pBufferNode = NULL; - if ( (m_vNewElementCollectors.size()>0) || + if ( (!m_vNewElementCollectors.empty()) || (m_pNewBlocker != NULL)) { /* @@ -204,7 +204,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(); @@ -715,7 +715,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; |