diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-08 10:59:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-08 10:59:43 +0100 |
commit | 6271381baa0d2db257070cb7ecfc9abf89faaf0f (patch) | |
tree | bbe39b7c61604f44f03e670ee83344f05643796f /sfx2/source/control/msgpool.cxx | |
parent | 7e8bf2dbe521e3ef51d318b1d66c33bd268f9479 (diff) |
loplugin:loopvartoosmall
Change-Id: I788afd92bb404d8faf96b631d2e7c6f869e49c2d
Diffstat (limited to 'sfx2/source/control/msgpool.cxx')
-rw-r--r-- | sfx2/source/control/msgpool.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx index b771e1e49b6b..adbb0e6968fc 100644 --- a/sfx2/source/control/msgpool.cxx +++ b/sfx2/source/control/msgpool.cxx @@ -285,12 +285,13 @@ SfxInterface* SfxSlotPool::FirstInterface() const SfxSlot* SfxSlotPool::GetUnoSlot( const OUString& rName ) { const SfxSlot *pSlot = nullptr; - for (sal_uInt16 nInterface = 0; _pInterfaces && nInterface < _pInterfaces->size(); ++nInterface) - { - pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName ); - if ( pSlot ) - break; - } + if (_pInterfaces) + for (auto const & nInterface: *_pInterfaces) + { + pSlot = nInterface->GetSlot( rName ); + if ( pSlot ) + break; + } if ( !pSlot && _pParentPool ) pSlot = _pParentPool->GetUnoSlot( rName ); |