Use emptiness check rather than size check for efficiency
This commit is contained in:
committed by
Michael Meeks
parent
b7a0b9e519
commit
df69ab8a80
@@ -120,7 +120,7 @@ sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const
|
|||||||
|
|
||||||
sal_Bool CFormatEtcContainer::hasElements( ) const
|
sal_Bool CFormatEtcContainer::hasElements( ) const
|
||||||
{
|
{
|
||||||
return ( m_FormatMap.size( ) > 0 );
|
return !m_FormatMap.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@@ -482,7 +482,7 @@ typedef Sequence<sal_Int8> ByteSequence_t;
|
|||||||
a double '\0' terminated string buffer */
|
a double '\0' terminated string buffer */
|
||||||
size_t CalcSizeForStringListBuffer(const FileList_t& fileList)
|
size_t CalcSizeForStringListBuffer(const FileList_t& fileList)
|
||||||
{
|
{
|
||||||
if (fileList.size() == 0)
|
if ( fileList.empty() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
size_t size = 1; // one for the very final '\0'
|
size_t size = 1; // one for the very final '\0'
|
||||||
|
Reference in New Issue
Block a user