Kaydet (Commit) 1e4b29e1 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Range-based for-loops.

Change-Id: I6fb0d182dfccb3af42f0bbc60969c72df09b6ce6
üst 87130a4e
...@@ -142,28 +142,19 @@ namespace slideshow ...@@ -142,28 +142,19 @@ namespace slideshow
// for all shapes, though. // for all shapes, though.
const bool bMoreThanOneLayer(maLayers.size() > 1); const bool bMoreThanOneLayer(maLayers.size() > 1);
if( mnActiveSprites || bMoreThanOneLayer ) if (mnActiveSprites || bMoreThanOneLayer)
{ {
// clear all viewlayers, dump everything but the // clear all viewlayers, dump everything but the
// background layer - this will also remove all shape // background layer - this will also remove all shape
// sprites // sprites
std::for_each( maAllShapes.begin(), for (auto& rShape : maAllShapes)
maAllShapes.end(), rShape.first->clearAllViewLayers();
[]( const LayerShapeMap::value_type& cp )
{ cp.first->clearAllViewLayers(); } ); for (auto& rShape : maAllShapes)
rShape.second.reset();
for (LayerShapeMap::iterator
iShape (maAllShapes.begin()),
iEnd (maAllShapes.end());
iShape!=iEnd;
++iShape)
{
iShape->second.reset();
}
if( bMoreThanOneLayer ) if (bMoreThanOneLayer)
maLayers.erase(maLayers.begin()+1, maLayers.erase(maLayers.begin() + 1, maLayers.end());
maLayers.end());
mbLayerAssociationDirty = true; mbLayerAssociationDirty = true;
} }
......
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