diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-11 10:06:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-11 10:07:08 +0200 |
commit | 776a3f14f2d987312b926ebc1ad09321a3a87f0d (patch) | |
tree | 09be8f37156fb9147e306dbd27d5dfa8e282c43f /package | |
parent | f60e521f24863643c7befed7f84db7d659c3c547 (diff) |
convert expressions like 'size() == 0' to 'empty()'
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 10 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index fd2b39f02159..cb827a137aa9 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -79,7 +79,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & embed::ElementModes::WRITE ) ) throw io::IOException(); - if ( !aListPath.size() ) + if ( aListPath.empty() ) throw uno::RuntimeException(); OUString aNextName = *(aListPath.begin()); @@ -94,9 +94,9 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea if ( !xOwnStor.is() ) throw uno::RuntimeException(); - if ( !aListPath.size() ) + if ( aListPath.empty() ) { - if ( !aEncryptionData.size() ) + if ( aEncryptionData.empty() ) { uno::Reference< embed::XHierarchicalStorageAccess > xHStorage( xOwnStor, uno::UNO_QUERY_THROW ); xResult = xHStorage->openStreamElementByHierarchicalName( aNextName, nStreamMode ); @@ -162,7 +162,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList { ::osl::MutexGuard aGuard( m_aMutex ); - if ( !aListPath.size() ) + if ( aListPath.empty() ) throw uno::RuntimeException(); OUString aNextName = *(aListPath.begin()); @@ -177,7 +177,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList if ( !xOwnStor.is() ) throw uno::RuntimeException(); - if ( !aListPath.size() ) + if ( aListPath.empty() ) { xOwnStor->removeElement( aNextName ); } diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index e3cdbf20f9dd..59d8de64974a 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -76,7 +76,7 @@ namespace package bool PackageEncryptionDatasEqual( const ::comphelper::SequenceAsHashMap& aHash1, const ::comphelper::SequenceAsHashMap& aHash2 ) { - bool bResult = ( aHash1.size() && aHash1.size() == aHash2.size() ); + bool bResult = !aHash1.empty() && aHash1.size() == aHash2.size(); for ( ::comphelper::SequenceAsHashMap::const_iterator aIter = aHash1.begin(); bResult && aIter != aHash1.end(); ++aIter ) @@ -455,7 +455,7 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn if ( m_nStorageType != embed::StorageFormats::PACKAGE ) throw uno::RuntimeException(); - if ( !aEncryptionData.size() ) + if ( aEncryptionData.empty() ) throw uno::RuntimeException(); GetStreamProperties(); |