diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-08-11 14:51:35 -0400 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-08-11 22:29:12 +0000 |
commit | 87130a4e18347d055331ff53da3b1a79548ff24a (patch) | |
tree | f1d3cfe7b7a2a9e7c9b3efbeddf23da9e7b9845e /extensions/source | |
parent | ae6afadbc0c6ffcdbfd0db6bb3b0166295d5effd (diff) |
tdf#92459 Cleanup unclear lambdas
Replace lambdas used to select the first/second member of a pair with
the new simplified select1st/2nd from o3tl/compat_functional. There
should be no side effects due to this change.
Change-Id: I17f37796e0c4defe96a10aa491d192adb9eebb89
Reviewed-on: https://gerrit.libreoffice.org/17656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/propctrlr/eformshelper.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/eventhandler.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/genericpropertyhandler.cxx | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 14731e1bebdb..a7672886958d 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -34,6 +34,7 @@ #include <functional> #include <algorithm> +#include <o3tl/compat_functional.hxx> namespace pcr { @@ -700,7 +701,7 @@ namespace pcr _rElementNames.resize( rMapUINameToElement.size() ); ::std::transform( rMapUINameToElement.begin(), rMapUINameToElement.end(), _rElementNames.begin(), - []( const ::std::pair< MapStringToPropertySet::key_type, MapStringToPropertySet::mapped_type>& cp) { return cp.first; } ); + ::o3tl::select1st< MapStringToPropertySet::value_type >() ); } diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 6a15c56f034e..f030e6437660 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -68,6 +68,7 @@ #include <map> #include <algorithm> +#include <o3tl/compat_functional.hxx> extern "C" void SAL_CALL createRegistryInfo_EventHandler() { @@ -775,7 +776,7 @@ namespace pcr StlSyntaxSequence< Property > aReturn( aOrderedProperties.size() ); ::std::transform( aOrderedProperties.begin(), aOrderedProperties.end(), aReturn.begin(), - []( const ::std::pair< EventId, Property >& cp ) { return cp.second; } ); + ::o3tl::select2nd< std::map< EventId, Property >::value_type >() ); return aReturn; } diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index af489cc70d45..de94363d82d7 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -41,6 +41,7 @@ #include <tools/debug.hxx> #include <algorithm> +#include <o3tl/compat_functional.hxx> extern "C" void SAL_CALL createRegistryInfo_GenericPropertyHandler() { @@ -530,8 +531,7 @@ namespace pcr Sequence< Property > aReturn( m_aProperties.size() ); ::std::transform( m_aProperties.begin(), m_aProperties.end(), - aReturn.getArray(), []( const ::std::pair< PropertyMap::key_type, PropertyMap::mapped_type >& cp ) - { return cp.second; } ); + aReturn.getArray(), ::o3tl::select2nd< PropertyMap::value_type >() ); return aReturn; } |