summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/waitsymbol.cxx
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2015-10-09 09:21:20 -0400
committerNoel Grandin <noelgrandin@gmail.com>2015-10-11 06:13:15 +0000
commitb6297280853a7325ac0fa226b783652b22daebd0 (patch)
tree776739246232bc937d913d019841e3902423ed78 /slideshow/source/engine/waitsymbol.cxx
parent143fb0a4b5d4ab69d4928299d8112ab95d99870a (diff)
Replace simple while loops with range-based for
Replace simple while loops with range-based for-loops when apropriate. There should be no side effects due to this change. Change-Id: I0c39d4c10c991354248e864a09333144974c953c Reviewed-on: https://gerrit.libreoffice.org/19281 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'slideshow/source/engine/waitsymbol.cxx')
-rw-r--r--slideshow/source/engine/waitsymbol.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/slideshow/source/engine/waitsymbol.cxx b/slideshow/source/engine/waitsymbol.cxx
index ab3dbbf29eb7..5e4209ab8d51 100644
--- a/slideshow/source/engine/waitsymbol.cxx
+++ b/slideshow/source/engine/waitsymbol.cxx
@@ -77,19 +77,15 @@ void WaitSymbol::setVisible( const bool bVisible )
{
mbVisible = bVisible;
- ViewsVecT::const_iterator aIter( maViews.begin() );
- ViewsVecT::const_iterator const aEnd ( maViews.end() );
- while( aIter != aEnd )
+ for( const auto& rView : maViews )
{
- if( aIter->second )
+ if( rView.second )
{
if( bVisible )
- aIter->second->show();
+ rView.second->show();
else
- aIter->second->hide();
+ rView.second->hide();
}
-
- ++aIter;
}
// sprites changed, need a screen update for this frame.
@@ -176,14 +172,11 @@ void WaitSymbol::viewChanged( const UnoViewSharedPtr& rView )
void WaitSymbol::viewsChanged()
{
// reposition sprites on all views
- ViewsVecT::const_iterator aIter( maViews.begin() );
- ViewsVecT::const_iterator const aEnd ( maViews.end() );
- while( aIter != aEnd )
+ for( const auto& rView : maViews )
{
- if( aIter->second )
- aIter->second->movePixel(
- calcSpritePos( aIter->first ));
- ++aIter;
+ if( rView.second )
+ rView.second->movePixel(
+ calcSpritePos( rView.first ) );
}
}