diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-03-29 21:36:59 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2016-03-30 05:06:21 +0000 |
commit | a0527676b17838c310701f169ce23d0386b82eb6 (patch) | |
tree | 55f06881249f196372d399dc49c0e47d0552ed3d /svl/source/items/itempool.cxx | |
parent | 1d060568ce8e7b8aa04c418e282962131801bea4 (diff) |
Use const_iterator when possible (svl except svdde)
Change-Id: Ie19467a020d1839146d5a6324e54ccf223d99dd6
Reviewed-on: https://gerrit.libreoffice.org/23603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svl/source/items/itempool.cxx')
-rw-r--r-- | svl/source/items/itempool.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 34153c729311..dda54dd4cee5 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -370,7 +370,7 @@ void SfxItemPool::Free(SfxItemPool* pPool) { // tell all the registered SfxItemPoolUsers that the pool is in destruction std::vector<SfxItemPoolUser*> aListCopy(pPool->pImp->maSfxItemPoolUsers.begin(), pPool->pImp->maSfxItemPoolUsers.end()); - for(std::vector<SfxItemPoolUser*>::iterator aIterator = aListCopy.begin(); aIterator != aListCopy.end(); ++aIterator) + for(std::vector<SfxItemPoolUser*>::const_iterator aIterator = aListCopy.begin(); aIterator != aListCopy.end(); ++aIterator) { SfxItemPoolUser* pSfxItemPoolUser = *aIterator; DBG_ASSERT(pSfxItemPoolUser, "corrupt SfxItemPoolUser list (!)"); @@ -411,7 +411,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool ) SfxPoolItemArray_Impl* pItemArr = pImp->mpSecondary->pImp->maPoolItems[n]; if ( pItemArr ) { - SfxPoolItemArrayBase_Impl::iterator ppHtArr = pItemArr->begin(); + SfxPoolItemArrayBase_Impl::const_iterator ppHtArr = pItemArr->begin(); for( size_t i = pItemArr->size(); i; ++ppHtArr, --i ) if ( !(*ppHtArr) ) { @@ -514,7 +514,7 @@ void SfxItemPool::Delete() { if ( *itrItemArr ) { - SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*itrItemArr)->begin(); + SfxPoolItemArrayBase_Impl::const_iterator ppHtArr = (*itrItemArr)->begin(); for ( size_t n = (*itrItemArr)->size(); n; --n, ++ppHtArr ) if (*ppHtArr) { @@ -546,7 +546,7 @@ void SfxItemPool::Delete() { if ( *itrItemArr ) { - SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*itrItemArr)->begin(); + SfxPoolItemArrayBase_Impl::const_iterator ppHtArr = (*itrItemArr)->begin(); for ( size_t n = (*itrItemArr)->size(); n; --n, ++ppHtArr ) if (*ppHtArr) { @@ -806,7 +806,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) SfxPoolItemArray_Impl* pItemArr = pImp->maPoolItems[nIndex]; assert(pItemArr && "removing Item not in Pool"); - SfxPoolItemArray_Impl::PoolItemPtrToIndexMap::iterator it; + SfxPoolItemArray_Impl::PoolItemPtrToIndexMap::const_iterator it; it = pItemArr->maPtrToIndex.find(const_cast<SfxPoolItem *>(&rItem)); if (it != pItemArr->maPtrToIndex.end()) { |