summaryrefslogtreecommitdiff
path: root/sfx2/source/view/lokhelper.cxx
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 11:24:57 +0200
commitecc29bf323a83b0379ffed31057c8ab409e0d2d2 (patch)
tree8b98f02b0defc503564b951f5222e2e388153c69 /sfx2/source/view/lokhelper.cxx
parent0ea50b5b43a934f2ab080f50585e386ebce0b805 (diff)
sfx2: use range-based for loop in lokhelper
Change-Id: I7c3421231dd74c8d1e2678a6aee92288fdd3221a
Diffstat (limited to 'sfx2/source/view/lokhelper.cxx')
-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 822547469799..36203ceafd0a 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -40,9 +40,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();
@@ -58,9 +57,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())