summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/linkmgr2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-09 13:23:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-10 06:30:37 +0000
commit990ab0342a7b0c66a4bf9bac75d5c881f0f7266b (patch)
treec1099d7b9ea1a45e6a5b42eae369b0c1551bd491 /sfx2/source/appl/linkmgr2.cxx
parentf469309e265b8cf692b2048eb29ce972f939c3f2 (diff)
clang-tidy modernize-loop-convert sfx2
Change-Id: Ief72064e2869945734215a7c67440adc6c1550c3 Reviewed-on: https://gerrit.libreoffice.org/24799 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/appl/linkmgr2.cxx')
-rw-r--r--sfx2/source/appl/linkmgr2.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index d2926c2a0f1d..df5d5afb08f5 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -72,9 +72,8 @@ LinkManager::LinkManager(SfxObjectShell* p)
LinkManager::~LinkManager()
{
- for( size_t n = 0; n < aLinkTbl.size(); ++n)
+ for(tools::SvRef<SvBaseLink> & rTmp : aLinkTbl)
{
- tools::SvRef<SvBaseLink>& rTmp = aLinkTbl[ n ];
if( rTmp.Is() )
{
rTmp->Disconnect();
@@ -297,14 +296,12 @@ void LinkManager::UpdateAllLinks(
aTmpArr.push_back( rLink.get() );
}
- for( size_t n = 0; n < aTmpArr.size(); ++n )
+ for(SvBaseLink* pLink : aTmpArr)
{
- SvBaseLink* pLink = aTmpArr[ n ];
-
// search first in the array after the entry
bool bFound = false;
- for( size_t i = 0; i < aLinkTbl.size(); ++i )
- if( pLink == aLinkTbl[ i ].get() )
+ for(tools::SvRef<SvBaseLink> & i : aLinkTbl)
+ if( pLink == i.get() )
{
bFound = true;
break;