Kaydet (Commit) c04fd824 authored tarafından Mario J. Rugiero's avatar Mario J. Rugiero Kaydeden (comit) Noel Grandin

for_each -> range-based for in canvas/source/tools/spriteredrawmanager.cxx

Change-Id: Ibe089e53488a9ba6baded637b17a1aeee0908f79
Reviewed-on: https://gerrit.libreoffice.org/19709Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 1bd101d9
...@@ -197,10 +197,10 @@ namespace canvas ...@@ -197,10 +197,10 @@ namespace canvas
*/ */
void operator()( const Sprite::Reference& rSprite ) void operator()( const Sprite::Reference& rSprite )
{ {
const SpriteTracer aSpriteTracer( SpriteTracer aSpriteTracer( rSprite );
::std::for_each( mrChangeContainer.begin(),
mrChangeContainer.end(), for (auto const& aChange : mrChangeContainer)
SpriteTracer( rSprite ) ) ); aSpriteTracer( aChange );
aSpriteTracer.commit( mrUpdater ); aSpriteTracer.commit( mrUpdater );
} }
...@@ -265,10 +265,9 @@ namespace canvas ...@@ -265,10 +265,9 @@ namespace canvas
// for each unique sprite, check the change event vector, // for each unique sprite, check the change event vector,
// calculate the update operation from that, and add the // calculate the update operation from that, and add the
// result to the aUpdateArea. // result to the aUpdateArea.
::std::for_each( aUpdatableSprites.begin(), SpriteUpdater aSpriteUpdater( rUpdateAreas, maChangeRecords);
aEnd, for (auto const& aUpdatableSprite : aUpdatableSprites)
SpriteUpdater( rUpdateAreas, aSpriteUpdater( aUpdatableSprite);
maChangeRecords) );
// TODO(P2): Implement your own output iterator adapter, to // TODO(P2): Implement your own output iterator adapter, to
// avoid that totally superfluous temp aUnchangedSprites // avoid that totally superfluous temp aUnchangedSprites
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment