summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 08:12:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 10:02:39 +0200
commit2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch)
tree6f356017d24dffcd25261295ab25a21b738dc835 /comphelper
parentad18bb24d51e4f735085d50c496d28bd637dbb0b (diff)
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/container.cxx2
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx2
-rw-r--r--comphelper/source/misc/numberedcollection.cxx2
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx
index a9edef8a458f..1a6132e0d65a 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -72,7 +72,7 @@ css::uno::Reference< css::uno::XInterface> const & IndexAccessIterator::Next()
}
else
{ // otherwise, look above and to the right, if possible
- while (m_arrChildIndizies.size() > 0)
+ while (!m_arrChildIndizies.empty())
{ // If the list isn't empty and there's nothing above
css::uno::Reference< css::container::XChild> xChild(xSearchLoop, css::uno::UNO_QUERY);
OSL_ENSURE(xChild.is(), "IndexAccessIterator::Next : a content has no appropriate interface !");
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 456c1f605bdc..cd927faa2bb8 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -234,7 +234,7 @@ uno::Sequence < OUString > EmbeddedObjectContainer::GetObjectNames() const
bool EmbeddedObjectContainer::HasEmbeddedObjects() const
{
- return pImpl->maObjectContainer.size() != 0;
+ return !pImpl->maObjectContainer.empty();
}
bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName )
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 8b742d295cf9..8f5f2061fc1c 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -221,7 +221,7 @@ OUString SAL_CALL NumberedCollection::getUntitledPrefix()
impl_cleanUpDeadItems(m_lComponents, lDeadItems);
// a) non free numbers ... return INVALID_NUMBER
- if (lPossibleNumbers.size () < 1)
+ if (lPossibleNumbers.empty())
return css::frame::UntitledNumbersConst::INVALID_NUMBER;
// b) return first free number
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 4a2bf122b39e..99ccf04f7ae2 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -291,7 +291,7 @@ OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
uno::Sequence< uno::Sequence< beans::StringPair > > const & OFOPXMLHelper_Impl::GetParsingResult() const
{
- if ( m_aElementsSeq.size() )
+ if ( !m_aElementsSeq.empty() )
throw uno::RuntimeException(); // the parsing has still not finished!
return m_aResultSeq;