diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-23 09:05:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-23 09:05:45 +0100 |
commit | 7a67aa47146676803b2bc485677e71a5a340e065 (patch) | |
tree | 486fcd74ee5ca71d616971e1c91b5d57ca2a4fd4 /svtools/source/contnr | |
parent | ba04800b57e0318739cdcb379bbcc9a65aa2e344 (diff) |
WaE: build without warnings
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index d3e0e0581636..29ca5b1c13ff 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -179,12 +179,12 @@ SvListEntry* SvTreeEntryList::operator[]( size_t i ) size_t SvTreeEntryList::GetPos( SvListEntry* pItem ) { - for ( size_t i = 0, n = aTreeEntryList.size(); i < n; ++i ) { - if ( aTreeEntryList[ i ] == pItem ) { + for ( size_t i = 0, n = aTreeEntryList.size(); i < n; ++i ) + { + if ( aTreeEntryList[ i ] == pItem ) return i; - } } - return NULL; + return 0; } void SvTreeEntryList::push_back( SvListEntry* pItem ) @@ -586,7 +586,7 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds, SvListEntry* pNewParent, sal_uLong& nCloneCount ) const { - DBG_ASSERT(pChilds->Count(),"Childs?"); + DBG_ASSERT(!pChilds->empty(),"Childs?"); SvTreeEntryList* pClonedChilds = new SvTreeEntryList; for ( size_t i = 0, n = pChilds->size(); i < n; ++i ) { |