diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-11-27 22:17:40 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-29 12:06:44 +0100 |
commit | 0ded54c33f01d18d2cd06547bd8307bd140cf28f (patch) | |
tree | e250a9a8bb89b2042d9a0bc09f80bf65757eec19 /stoc/source/servicemanager/servicemanager.cxx | |
parent | 7d311ea864e7cfeb1c8f4ca417911db20d13361e (diff) |
Simplify containers iterations in slideshow, sot, starmath, stoc
Use range-based loop or replace with STL functions
Change-Id: I94792c28b283a0998bf813317e5beb37d93e0c23
Reviewed-on: https://gerrit.libreoffice.org/64125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/servicemanager/servicemanager.cxx')
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 43aadfff0fbf..39ea85c5a833 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -640,12 +640,11 @@ void OServiceManager::disposing() m_bInDisposing = true; aImpls = m_ImplementationMap; } - HashSet_Ref::iterator aIt = aImpls.begin(); - while( aIt != aImpls.end() ) + for( const auto& rxImpl : aImpls ) { try { - Reference<XComponent > xComp( Reference<XComponent >::query( *aIt++ ) ); + Reference<XComponent > xComp( Reference<XComponent >::query( rxImpl ) ); if( xComp.is() ) xComp->dispose(); } @@ -779,9 +778,8 @@ Sequence< OUString > OServiceManager::getUniqueAvailableServiceNames( { check_undisposed(); MutexGuard aGuard( m_mutex ); - HashMultimap_OWString_Interface::iterator aSIt = m_ServiceMap.begin(); - while( aSIt != m_ServiceMap.end() ) - aNameSet.insert( (*aSIt++).first ); + for( const auto& rEntry : m_ServiceMap ) + aNameSet.insert( rEntry.first ); /* do not return the implementation names HashMap_OWString_Interface m_ImplementationNameMap; |