summaryrefslogtreecommitdiff
path: root/package
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 /package
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 'package')
-rw-r--r--package/source/xstor/xstorage.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx2
-rw-r--r--package/source/zippackage/zipfileaccess.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index c3c9a0ae7022..f29ecfd3ea0a 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1842,7 +1842,7 @@ void OStorage::InternalDispose( bool bNotifyImpl )
if ( m_pData->m_bReadOnlyWrap )
{
- OSL_ENSURE( !m_pData->m_aOpenSubComponentsVector.size() || m_pData->m_pSubElDispListener.get(),
+ OSL_ENSURE( m_pData->m_aOpenSubComponentsVector.empty() || m_pData->m_pSubElDispListener.get(),
"If any subelements are open the listener must exist!" );
if (m_pData->m_pSubElDispListener)
@@ -3930,7 +3930,7 @@ sal_Bool SAL_CALL OStorage::hasElements()
try
{
- return ( m_pImpl->GetChildrenVector().size() != 0 );
+ return ( !m_pImpl->GetChildrenVector().empty() );
}
catch( const uno::RuntimeException& rRuntimeException )
{
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 443eaf8dce96..8026ffc5cbf9 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -214,7 +214,7 @@ uno::Type SAL_CALL ZipPackageFolder::getElementType( )
}
sal_Bool SAL_CALL ZipPackageFolder::hasElements( )
{
- return maContents.size() > 0;
+ return !maContents.empty();
}
// XNameAccess
ZipContentInfo& ZipPackageFolder::doGetByName( const OUString& aName )
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index fb6007d8e203..9d7e3d355a19 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -368,7 +368,7 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
if ( !m_pZipFile )
throw uno::RuntimeException(THROW_WHERE);
- return ( m_pZipFile->GetEntryHash().size() != 0 );
+ return ( !m_pZipFile->GetEntryHash().empty() );
}
// XZipFileAccess