summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/transitions/slidechangebase.cxx
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2015-08-21 21:51:09 -0400
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-08-24 21:20:13 +0000
commitead5bc3cfb07a4e96e367e7904dc674ee5f5ccd6 (patch)
tree46abe4e85efecb06058063290b14efeba08c1762 /slideshow/source/engine/transitions/slidechangebase.cxx
parent0a76c1fd6875bd094ebe2bfbed3d01c98dc0c19e (diff)
slideshow: replace for_each with range-based loop
Replace ::std::for_each for a more readable range-based for loop in cases in which the function object to be applied by for_each is more readable as the body of a for loop. Change-Id: Ib0b488b36ed58c65c56357e04391b85096d043aa Reviewed-on: https://gerrit.libreoffice.org/17930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'slideshow/source/engine/transitions/slidechangebase.cxx')
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx23
1 files changed, 7 insertions, 16 deletions
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index 0a99eeb6e719..a39d40162147 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -29,7 +29,6 @@
#include "slidechangebase.hxx"
#include "tools.hxx"
-#include <boost/bind.hpp>
#include <algorithm>
using namespace com::sun::star;
@@ -180,11 +179,8 @@ void SlideChangeBase::prefetch( const AnimatableShapeSharedPtr&,
mrEventMultiplexer.addViewHandler( shared_from_this() );
// init views and create slide bitmaps
- std::for_each( mrViewContainer.begin(),
- mrViewContainer.end(),
- boost::bind( &SlideChangeBase::viewAdded,
- this,
- _1 ));
+ for( const auto& rView : mrViewContainer )
+ this->viewAdded( rView );
mbPrefetched = true;
}
@@ -415,11 +411,9 @@ void SlideChangeBase::viewRemoved( const UnoViewSharedPtr& rView )
std::remove_if(
maViewData.begin(),
maViewData.end(),
- boost::bind(
- std::equal_to<UnoViewSharedPtr>(),
- rView,
- // select view:
- boost::bind( &ViewEntry::getView, _1 ))),
+ [&rView]( const ViewEntry& rViewEntry )
+ // select and compare view
+ { return rView == rViewEntry.getView(); } ),
maViewData.end() );
}
@@ -434,11 +428,8 @@ void SlideChangeBase::viewChanged( const UnoViewSharedPtr& rView )
std::find_if(
maViewData.begin(),
maViewData.end(),
- boost::bind(
- std::equal_to<UnoViewSharedPtr>(),
- rView,
- // select view:
- boost::bind( &ViewEntry::getView, _1 ) )));
+ [&rView]( const ViewEntry& rViewEntry )
+ { return rView == rViewEntry.getView(); } ) );
OSL_ASSERT( aModifiedEntry != maViewData.end() );
if( aModifiedEntry == maViewData.end() )