Kaydet (Commit) 368b657f authored tarafından Thorsten Behrens's avatar Thorsten Behrens

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 c04fd824

Change-Id: I75c5f1b343c3fa8855f6d7f8f706b9259bc9f6df
üst 364590a5
...@@ -265,9 +265,10 @@ namespace canvas ...@@ -265,9 +265,10 @@ 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.
SpriteUpdater aSpriteUpdater( rUpdateAreas, maChangeRecords); ::std::for_each( aUpdatableSprites.begin(),
for (auto const& aUpdatableSprite : aUpdatableSprites) aEnd,
aSpriteUpdater( aUpdatableSprite); SpriteUpdater( rUpdateAreas,
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