summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-14 09:12:44 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-14 19:48:46 +0200
commit5f81b7a3a2db50b1ead2b07f86be94613b781c67 (patch)
tree353e12fff865303e030ed78e9675bf2a39cd3c50
parent09df3dbc5b1bb8764b96200e6905545b900afebb (diff)
sfx2: use range-based for loop in lokhelper
Change-Id: I7c3421231dd74c8d1e2678a6aee92288fdd3221a (cherry picked from commit ecc29bf323a83b0379ffed31057c8ab409e0d2d2)
-rw-r--r--sfx2/source/view/lokhelper.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 0e7af55e4682..59cdb833ead1 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -36,9 +36,8 @@ void SfxLokHelper::destroyView(int nId)
unsigned nViewShellId = nId;
SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl();
- for (std::size_t i = 0; i < rViewArr.size(); ++i)
+ for (SfxViewShell* pViewShell : rViewArr)
{
- SfxViewShell* pViewShell = rViewArr[i];
if (pViewShell->GetViewShellId() == nViewShellId)
{
SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
@@ -54,9 +53,8 @@ void SfxLokHelper::setView(int nId)
unsigned nViewShellId = nId;
SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl();
- for (std::size_t i = 0; i < rViewArr.size(); ++i)
+ for (SfxViewShell* pViewShell : rViewArr)
{
- SfxViewShell* pViewShell = rViewArr[i];
if (pViewShell->GetViewShellId() == nViewShellId)
{
if (pViewShell == SfxViewShell::Current())