diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-02-19 14:34:44 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-02-19 14:55:50 +0100 |
commit | 26912eea7521dd2b84bfac56b322cf0f8b142450 (patch) | |
tree | 0d0268375b3ac3c85ae4dd7f1ee1e847cc707ef3 /sd/source/ui/slidesorter/controller/SlsAnimator.cxx | |
parent | db98187505c4eb95c0f815ee2646334b08445e21 (diff) |
sd: replace boost::bind with C++11 lambdas and for loops
Change-Id: I4de92df1848a1c00e71d4cdb5638b73c3b76f282
Diffstat (limited to 'sd/source/ui/slidesorter/controller/SlsAnimator.cxx')
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsAnimator.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx index a4c6734fc5f4..2dd7db85bf08 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx @@ -20,7 +20,6 @@ #include "controller/SlsAnimator.hxx" #include "view/SlideSorterView.hxx" #include "View.hxx" -#include <boost/bind.hpp> namespace sd { namespace slidesorter { namespace controller { @@ -132,10 +131,8 @@ void Animator::RemoveAnimation (const Animator::AnimationId nId) const AnimationList::iterator iAnimation (::std::find_if( maAnimations.begin(), maAnimations.end(), - ::boost::bind( - ::std::equal_to<Animator::AnimationId>(), - nId, - ::boost::bind(&Animation::mnAnimationId, _1)))); + [nId] (std::shared_ptr<Animation> const& pAnim) + { return nId == pAnim->mnAnimationId; })); if (iAnimation != maAnimations.end()) { OSL_ASSERT((*iAnimation)->mnAnimationId == nId); @@ -156,12 +153,10 @@ void Animator::RemoveAnimation (const Animator::AnimationId nId) void Animator::RemoveAllAnimations() { - ::std::for_each( - maAnimations.begin(), - maAnimations.end(), - ::boost::bind( - &Animation::Expire, - _1)); + for (auto const& it : maAnimations) + { + it->Expire(); + } maAnimations.clear(); mnNextAnimationId = 0; |