summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/transitions
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-27 22:17:40 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 12:06:44 +0100
commit0ded54c33f01d18d2cd06547bd8307bd140cf28f (patch)
treee250a9a8bb89b2042d9a0bc09f80bf65757eec19 /slideshow/source/engine/transitions
parent7d311ea864e7cfeb1c8f4ca417911db20d13361e (diff)
Simplify containers iterations in slideshow, sot, starmath, stoc
Use range-based loop or replace with STL functions Change-Id: I94792c28b283a0998bf813317e5beb37d93e0c23 Reviewed-on: https://gerrit.libreoffice.org/64125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source/engine/transitions')
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 75abacdbbfbf..db39e543b4a1 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -205,14 +205,12 @@ public:
SAL_INFO("slideshow", "PluginSlideChange viewRemoved");
SlideChangeBase::viewRemoved( rView );
- for( auto aIter = maTransitions.begin(); aIter != maTransitions.end(); ++aIter )
+ auto aIter = std::find_if(maTransitions.begin(), maTransitions.end(),
+ [&rView](const std::unique_ptr<TransitionViewPair>& rxTransition) { return rxTransition->mpView == rView; });
+ if (aIter != maTransitions.end())
{
- if( ( *aIter )->mpView == rView )
- {
- SAL_INFO("slideshow", "view removed" );
- maTransitions.erase( aIter );
- break;
- }
+ SAL_INFO("slideshow", "view removed" );
+ maTransitions.erase( aIter );
}
}