diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-28 15:13:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-29 07:17:37 +0100 |
commit | 21de55596c0fdc2be736c6d0369bd9d3783020be (patch) | |
tree | 07d0f0cd54690e54405fe574c572cb2be74a3336 /framework | |
parent | da9fb5d6d9ebf9363981c370ce937d8848989fcb (diff) |
remove unnecessary "if (!empty()" checks before loops
found with
git grep -n -A4 'if.*!.*empty' | grep -B3 -P
'(\bfor)|(\bwhile)|(\bdo)'
Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334
Reviewed-on: https://gerrit.libreoffice.org/64169
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/dispatch/interceptionhelper.cxx | 2 | ||||
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx index 27fb2a14b538..32378f2283a5 100644 --- a/framework/source/dispatch/interceptionhelper.cxx +++ b/framework/source/dispatch/interceptionhelper.cxx @@ -52,7 +52,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL InterceptionHelper::queryD // b) No match by registration - but a valid interceptor list. // Find first interceptor w/o pattern, so we need to query it - if (!xInterceptor.is() && !m_lInterceptionRegs.empty()) + if (!xInterceptor.is()) { for (auto const& lInterceptionReg : m_lInterceptionRegs) { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 8451bef2bbfc..3cfcbe3b88fc 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1269,12 +1269,9 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars() { } - if ( !aMakeVisibleToolbars.empty() ) + for (auto const& rURL : aMakeVisibleToolbars) { - for (auto const& rURL : aMakeVisibleToolbars) - { - requestToolbar(rURL); - } + requestToolbar(rURL); } } |