diff options
author | Mariusz Dykierek <mariuszdykierek@gmail.com> | 2012-02-17 15:18:29 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-17 15:22:29 +0000 |
commit | df69ab8a803f87c85d516bcfcc544c19c94ade85 (patch) | |
tree | ec3b58ae06ea262ccf54762d27a8a6747ece9888 /dtrans | |
parent | b7a0b9e51918fb0de2ec290f90178d36e4761f67 (diff) |
Use emptiness check rather than size check for efficiency
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/win32/dtobj/FetcList.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index 3bb3beb217e7..3599da875e08 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -120,7 +120,7 @@ sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const sal_Bool CFormatEtcContainer::hasElements( ) const { - return ( m_FormatMap.size( ) > 0 ); + return !m_FormatMap.empty(); } //------------------------------------------------------------------------ diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index c0121154bf8a..4093e92d685c 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -482,7 +482,7 @@ typedef Sequence<sal_Int8> ByteSequence_t; a double '\0' terminated string buffer */ size_t CalcSizeForStringListBuffer(const FileList_t& fileList) { - if (fileList.size() == 0) + if ( fileList.empty() ) return 0; size_t size = 1; // one for the very final '\0' |