diff options
author | Mario J. Rugiero <mrugiero@gmail.com> | 2015-10-31 14:46:27 -0300 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-01 11:29:31 +0000 |
commit | c04fd82433e9155ad61ebd92ca7b43a729a87890 (patch) | |
tree | 62b99297af2debabc4da1d3efcc9ab4b93d0c05b /canvas | |
parent | 1bd101d91d12e310ecfd27d86c4c81fdec8886a6 (diff) |
for_each -> range-based for in canvas/source/tools/spriteredrawmanager.cxx
Change-Id: Ibe089e53488a9ba6baded637b17a1aeee0908f79
Reviewed-on: https://gerrit.libreoffice.org/19709
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/tools/spriteredrawmanager.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 92b15f1d8718..fa06ace5caba 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -197,10 +197,10 @@ namespace canvas */ void operator()( const Sprite::Reference& rSprite ) { - const SpriteTracer aSpriteTracer( - ::std::for_each( mrChangeContainer.begin(), - mrChangeContainer.end(), - SpriteTracer( rSprite ) ) ); + SpriteTracer aSpriteTracer( rSprite ); + + for (auto const& aChange : mrChangeContainer) + aSpriteTracer( aChange ); aSpriteTracer.commit( mrUpdater ); } @@ -265,10 +265,9 @@ namespace canvas // for each unique sprite, check the change event vector, // calculate the update operation from that, and add the // result to the aUpdateArea. - ::std::for_each( aUpdatableSprites.begin(), - aEnd, - SpriteUpdater( rUpdateAreas, - maChangeRecords) ); + SpriteUpdater aSpriteUpdater( rUpdateAreas, maChangeRecords); + for (auto const& aUpdatableSprite : aUpdatableSprites) + aSpriteUpdater( aUpdatableSprite); // TODO(P2): Implement your own output iterator adapter, to // avoid that totally superfluous temp aUnchangedSprites |