summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/newfrm.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-14 00:57:07 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-14 09:58:55 +0100
commit25622f29b4003307d2ba780ff1232d8b7cdafa35 (patch)
treead15c747685e803deeb5fffd209ae0b5992ac87a /sw/source/core/layout/newfrm.cxx
parent638d619866784510dcbf0cadb6eb251208489a73 (diff)
Simplify containers iterations in sw/source/core/[d-l]*
Use range-based loop or replace with STL functions Change-Id: I143e9a769e1c1bb0228933a0a92150f00e3e1f20 Reviewed-on: https://gerrit.libreoffice.org/63347 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/newfrm.cxx')
-rw-r--r--sw/source/core/layout/newfrm.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 7a5ff2ac591c..adc2909c38a5 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -319,9 +319,8 @@ void SwRootFrame::DeRegisterShell( SwViewShell *pSh )
mpWaitingCurrShell = nullptr;
// Remove references
- for ( SwCurrShells::iterator it = mpCurrShells->begin(); it != mpCurrShells->end(); ++it )
+ for ( CurrShell *pC : *mpCurrShells )
{
- CurrShell *pC = *it;
if (pC->pPrev == pSh)
pC->pPrev = nullptr;
}
@@ -484,8 +483,8 @@ void SwRootFrame::DestroyImpl()
mpDestroy.reset();
// Remove references
- for ( SwCurrShells::iterator it = mpCurrShells->begin(); it != mpCurrShells->end(); ++it )
- (*it)->pRoot = nullptr;
+ for ( auto& rpCurrShell : *mpCurrShells )
+ rpCurrShell->pRoot = nullptr;
mpCurrShells.reset();