diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-12-01 15:19:04 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-01 18:26:01 +0100 |
commit | 56d97cdd0af15c90c744d2ac66e879818c073ec6 (patch) | |
tree | 98278957d27659cfa9fe5e9b1a4e2e550637fd73 /sfx2/source/view/viewsh.cxx | |
parent | fff501a3393b459c512ec155e2d2cd935e7885a2 (diff) |
Simplify containers iterations in sfx2, shell
Use range-based loop or replace with STL functions
Change-Id: I42361d6a73d201db8eb6dca09d79768e2d62051d
Reviewed-on: https://gerrit.libreoffice.org/64389
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index fa571944a96a..683d6a45f288 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -360,14 +360,9 @@ void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient const *pIPClient ) { std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(); - for(std::vector< SfxInPlaceClient* >::iterator it = pClients->begin(); it != pClients->end(); ++it) - { - if ( *it == pIPClient ) - { - pClients->erase( it ); - break; - } - } + auto it = std::find(pClients->begin(), pClients->end(), pIPClient); + if (it != pClients->end()) + pClients->erase( it ); } |