diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-07-31 10:24:01 -0400 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2015-08-01 06:25:49 +0000 |
commit | 5916d5866c109b17471a9c8604635612a0aa69ae (patch) | |
tree | adcf88686cd5d0472edcd06908eb84b3e670e3d9 /chart2/source/inc | |
parent | b593044e9c3d549d0edda43ba00cda67e089322a (diff) |
tdf#92459 replace deprecated o3tl features
Replace all uses of deprecated features from o3tl/compat_functional.hxx
with lambda expressions.
Change-Id: I6370c80dbe675da517904e535e19bf63830c3e2c
Reviewed-on: https://gerrit.libreoffice.org/17450
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: David Ostrovsky <david@ostrovsky.org>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/CommonFunctors.hxx | 8 | ||||
-rw-r--r-- | chart2/source/inc/ContainerHelper.hxx | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index c7bcff16c897..596af8ac9bfc 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -21,7 +21,6 @@ #include <algorithm> #include <functional> -#include <o3tl/compat_functional.hxx> #include <rtl/math.hxx> #include <com/sun/star/uno/Any.hxx> #include <rtl/ustring.hxx> @@ -185,10 +184,9 @@ template< class MapType > findValueInMap( const MapType & rMap, const typename MapType::mapped_type & rData ) { return ::std::find_if( rMap.begin(), rMap.end(), - ::o3tl::compose1( ::std::bind2nd( - ::std::equal_to< typename MapType::mapped_type >(), - rData ), - ::o3tl::select2nd< typename MapType::value_type >())); + [&rData] + ( const ::std::pair< typename MapType::key_type, typename MapType::mapped_type >& cp ) + { return rData == cp.second; } ); } } // namespace CommonFunctors diff --git a/chart2/source/inc/ContainerHelper.hxx b/chart2/source/inc/ContainerHelper.hxx index d6eee1a9aa61..655a01eb22d3 100644 --- a/chart2/source/inc/ContainerHelper.hxx +++ b/chart2/source/inc/ContainerHelper.hxx @@ -25,7 +25,6 @@ #include <algorithm> #include <functional> -#include <o3tl/compat_functional.hxx> namespace chart { @@ -143,7 +142,8 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::key_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - ::o3tl::select1st< typename Map::value_type >()); + []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp ) + { return cp.first; } ); return aResult; } @@ -160,7 +160,8 @@ template< class Map > { ::com::sun::star::uno::Sequence< typename Map::mapped_type > aResult( rCont.size()); ::std::transform( rCont.begin(), rCont.end(), aResult.getArray(), - ::o3tl::select2nd< typename Map::value_type >()); + []( const ::std::pair< typename Map::key_type, typename Map::mapped_type >& cp ) + { return cp.second; } ); return aResult; } |