diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-11-02 13:42:50 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-11-02 13:45:45 +0100 |
commit | 368b657f4ba4200e3f38fec58450c396ca73b729 (patch) | |
tree | 010e3f65c2ef3d3b11cf0f2aba4c001cef5b9c3d /canvas/source | |
parent | 364590a5fcf1b2344d64110e059086daaf64fb9b (diff) |
Partial revert 'for_each -> range-based'
There was a subtle change in semantics, the earlier loop was only
iterating until aEnd, covering only unique elements of the vector.
This partially reverts commit c04fd82433e9155ad61ebd92ca7b43a729a87890
Change-Id: I75c5f1b343c3fa8855f6d7f8f706b9259bc9f6df
Diffstat (limited to 'canvas/source')
-rw-r--r-- | canvas/source/tools/spriteredrawmanager.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index fa06ace5caba..345c3cdca964 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -265,9 +265,10 @@ namespace canvas // for each unique sprite, check the change event vector, // calculate the update operation from that, and add the // result to the aUpdateArea. - SpriteUpdater aSpriteUpdater( rUpdateAreas, maChangeRecords); - for (auto const& aUpdatableSprite : aUpdatableSprites) - aSpriteUpdater( aUpdatableSprite); + ::std::for_each( aUpdatableSprites.begin(), + aEnd, + SpriteUpdater( rUpdateAreas, + maChangeRecords) ); // TODO(P2): Implement your own output iterator adapter, to // avoid that totally superfluous temp aUnchangedSprites |