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/tools | |
parent | 1ec8d2c26f05fd1e84603cf0188a42e17c4195c1 (diff) |
inefficient emptiness check
Diffstat (limited to 'xmlsecurity/tools')
-rw-r--r-- | xmlsecurity/tools/demo/performance.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmlsecurity/tools/demo/performance.cxx b/xmlsecurity/tools/demo/performance.cxx index 1f8fc042fb6f..582f101957e6 100644 --- a/xmlsecurity/tools/demo/performance.cxx +++ b/xmlsecurity/tools/demo/performance.cxx @@ -522,10 +522,10 @@ rtl::OUString XSecTester::parseFile( m_bIsBlocking = false; m_bIsInsideCollectedElement = false; - OSL_ASSERT(m_vSignatureList.size() == 0); - OSL_ASSERT(m_vUnsolvedReferenceURIs.size() == 0); - OSL_ASSERT(m_vUnsolvedReferenceKeeperIds.size() == 0); - OSL_ASSERT(m_vUnsolvedReferenceRefNums.size() == 0); + OSL_ASSERT(m_vSignatureList.empty()); + OSL_ASSERT(m_vUnsolvedReferenceURIs.empty()); + OSL_ASSERT(m_vUnsolvedReferenceKeeperIds.empty()); + OSL_ASSERT(m_vUnsolvedReferenceRefNums.empty()); OSL_ASSERT(m_stCurrentPath.empty()); OSL_ASSERT(m_stCurrentPathType.empty()); OSL_ASSERT(m_vAncestorEvents.empty()); @@ -1510,9 +1510,9 @@ void XSecTester::checkReference( void XSecTester::endMission() { - while (m_vSignatureList.size() > 0) + while (!m_vSignatureList.empty()) { - if (m_vSignatureList.size()>0) + if (!m_vSignatureList.empty()) { SignatureEntity * pSignatureEntity = m_vSignatureList.at(0); m_vSignatureList.erase(m_vSignatureList.begin()); @@ -1521,7 +1521,7 @@ void XSecTester::endMission() } } - while (m_vUnsolvedReferenceURIs.size()>0) + while (!m_vUnsolvedReferenceURIs.empty()) { int nKeeperId = m_vUnsolvedReferenceKeeperIds.at(0); m_xSAXEventKeeper->removeElementCollector(nKeeperId); @@ -1641,7 +1641,7 @@ void XSecTester::flushAncestorEvents( /* free the ancestor events list */ std::vector< AncestorEvent* >::iterator jj; - while (m_vAncestorEvents.size()>0) + while (!m_vAncestorEvents.empty()) { jj = m_vAncestorEvents.begin(); delete *jj; |