summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/slideview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/slideview.cxx')
-rw-r--r--slideshow/source/engine/slideview.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 11f156b294d5..55c810d3841d 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -283,23 +283,19 @@ class LayerSpriteContainer
SpriteVector aValidSprites;
// check all sprites for validity and set new priority
- SpriteVector::iterator aCurrSprite( maSprites.begin() );
- const SpriteVector::iterator aEnd( maSprites.end() );
- while( aCurrSprite != aEnd )
+ for( const auto& rSprite : maSprites )
{
- cppcanvas::CustomSpriteSharedPtr pCurrSprite( aCurrSprite->mpSprite.lock() );
+ cppcanvas::CustomSpriteSharedPtr pCurrSprite( rSprite.mpSprite.lock() );
if( pCurrSprite )
{
// only copy still valid sprites over to the refreshed
// sprite vector.
- aValidSprites.push_back( *aCurrSprite );
+ aValidSprites.push_back( rSprite );
pCurrSprite->setPriority(
getSpritePriority( aValidSprites.size()-1 ));
}
-
- ++aCurrSprite;
}
// replace sprite list with pruned one
@@ -1147,11 +1143,9 @@ void SlideView::pruneLayers( bool bWithViewLayerUpdate ) const
getTransformation() );
// check all layers for validity, and retain only the live ones
- ViewLayerVector::const_iterator aCurr( maViewLayers.begin() );
- const ViewLayerVector::const_iterator aEnd( maViewLayers.end() );
- while( aCurr != aEnd )
+ for( const auto& rViewLayer : maViewLayers )
{
- boost::shared_ptr< SlideViewLayer > pCurrLayer( aCurr->lock() );
+ boost::shared_ptr< SlideViewLayer > pCurrLayer( rViewLayer.lock() );
if( pCurrLayer )
{
@@ -1161,8 +1155,6 @@ void SlideView::pruneLayers( bool bWithViewLayerUpdate ) const
pCurrLayer->updateView( rCurrTransform,
maUserSize );
}
-
- ++aCurr;
}
// replace layer list with pruned one