diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-08-16 23:58:50 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-08-17 00:04:14 +0900 |
commit | 99862627d0f240b8209ca08c0cd0cd5cad4cca3c (patch) | |
tree | 382cf34b7cd3b33e68ce159744901d28f016d8fb /fpicker | |
parent | 13021dae515db60405a255aab388318e54df99a6 (diff) |
cppcheck: possibly efficient checking for emptiness
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/win32/filepicker/FilterContainer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx b/fpicker/source/win32/filepicker/FilterContainer.cxx index f61ad675548a..eb2bc369377c 100644 --- a/fpicker/source/win32/filepicker/FilterContainer.cxx +++ b/fpicker/source/win32/filepicker/FilterContainer.cxx @@ -96,7 +96,7 @@ sal_Bool SAL_CALL CFilterContainer::addFilter( sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName ) { - OSL_ASSERT( m_vFilters.size() > 0 ); + OSL_ASSERT( !m_vFilters.empty() ); sal_Int32 pos = getFilterTagPos( aName ); if ( pos > -1 ) @@ -134,7 +134,7 @@ void SAL_CALL CFilterContainer::empty() sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& theFilter ) const { - OSL_PRECOND( m_vFilters.size() > 0, "Empty filter container" ); + OSL_PRECOND( !m_vFilters.empty() , "Empty filter container" ); sal_Int32 pos = getFilterTagPos( aName ); @@ -188,7 +188,7 @@ sal_Int32 SAL_CALL CFilterContainer::getFilterPos( const OUString& aName ) const sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) const { - if ( m_vFilters.size( ) > 0 ) + if ( !m_vFilters.empty() ) { sal_Int32 i = 0; FILTER_VECTOR_T::const_iterator iter; |