From 4d4b2ecb4e348ba783b6282e4fb27a771a589660 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 3 Dec 2014 22:55:09 +0100 Subject: use C++11 iteration Change-Id: Idcbc7a2a88623ce370d0325284d2e8f96a9e2033 --- sw/source/core/view/viewsh.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'sw') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 70ba96b4d887..06496b845b92 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -495,18 +495,16 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev ) bool SwViewShell::AddPaintRect( const SwRect & rRect ) { bool bRet = false; - SwViewShell *pSh = this; - do + for(SwViewShell& rSh : GetRingContainer()) { - if( pSh->Imp() ) + if( rSh.Imp() ) { - if ( pSh->IsPreview() && pSh->GetWin() ) - ::RepaintPagePreview( pSh, rRect ); + if ( rSh.IsPreview() && rSh.GetWin() ) + ::RepaintPagePreview( &rSh, rRect ); else - bRet |= pSh->Imp()->AddPaintRect( rRect ); + bRet |= rSh.Imp()->AddPaintRect( rRect ); } - pSh = static_cast(pSh->GetNext()); - } while ( pSh != this ); + } return bRet; } -- cgit