Kaydet (Commit) 39c7826c authored tarafından Daniel Robertson's avatar Daniel Robertson Kaydeden (comit) Noel Grandin

tdf#93243 slideshow: boost::bind -> C++11 lambdas

Replace boost::bind with C++11 lambdas. In addition, replace the use of
FuncT::result_type in ListenerOperations::notifyAllListeners with a less
type specific means of determining the return type of the function to be
applied in order to allow for the use of C++11 lambdas.

Change-Id: I1035be976e542d8b5bbd451c473a896d91ed66ca
Reviewed-on: https://gerrit.libreoffice.org/19314Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 4b55c289
...@@ -104,7 +104,7 @@ template< typename ListenerT > struct ListenerOperations ...@@ -104,7 +104,7 @@ template< typename ListenerT > struct ListenerOperations
bool bRet(false); bool bRet(false);
for( const auto& rCurr : rContainer ) for( const auto& rCurr : rContainer )
{ {
if( FunctionApply< typename FuncT::result_type, if( FunctionApply< typename ::std::result_of< FuncT( const typename ContainerT::value_type& ) >::type,
typename ContainerT::value_type >::apply( typename ContainerT::value_type >::apply(
func, func,
rCurr) ) rCurr) )
...@@ -155,7 +155,7 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > ...@@ -155,7 +155,7 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> >
boost::shared_ptr<ListenerTargetT> pListener( rCurr.lock() ); boost::shared_ptr<ListenerTargetT> pListener( rCurr.lock() );
if( pListener.get() && if( pListener.get() &&
FunctionApply< typename FuncT::result_type, FunctionApply< typename ::std::result_of< FuncT( const typename ContainerT::value_type& ) >::type,
boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) ) boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) )
{ {
bRet = true; bRet = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment