Simplify containers iterations in cppcanvas, cppu, cppuhelper

Use range-based loop or replace with STL functions

Change-Id: I72bf7cdb632c04e2fc8d4f7ab85cb6571222aa07
Reviewed-on: https://gerrit.libreoffice.org/68636
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Arkadiy Illarionov
2019-03-03 13:10:45 +03:00
committed by Noel Grandin
parent 20b1a4589e
commit 5af9e26ae8
11 changed files with 197 additions and 361 deletions

View File

@@ -608,10 +608,9 @@ void SAL_CALL uno_getMapping(
if (! aRet.is()) // try callback chain
{
MutexGuard aGuard( rData.aCallbacksMutex );
for ( t_CallbackSet::const_iterator iPos( rData.aCallbacks.begin() );
iPos != rData.aCallbacks.end(); ++iPos )
for ( const auto& rCallback : rData.aCallbacks )
{
(**iPos)( ppMapping, pFrom, pTo, aAddPurpose.pData );
(*rCallback)( ppMapping, pFrom, pTo, aAddPurpose.pData );
if (*ppMapping)
return;
}