summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2015-08-11 14:51:35 -0400
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-08-11 22:29:12 +0000
commit87130a4e18347d055331ff53da3b1a79548ff24a (patch)
treef1d3cfe7b7a2a9e7c9b3efbeddf23da9e7b9845e /forms
parentae6afadbc0c6ffcdbfd0db6bb3b0166295d5effd (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 'forms')
-rw-r--r--forms/source/xforms/convert.cxx6
-rw-r--r--forms/source/xforms/datatyperepository.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index 7ed865b6b2f6..1933daf7ae6f 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -23,6 +23,7 @@
#include "unohelper.hxx"
#include <algorithm>
#include <functional>
+#include <o3tl/compat_functional.hxx>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
@@ -38,6 +39,7 @@ using xforms::Convert;
using com::sun::star::uno::Any;
using com::sun::star::uno::makeAny;
using namespace std;
+using namespace o3tl;
using namespace utl;
typedef com::sun::star::util::Date UNODate;
@@ -305,9 +307,7 @@ Convert::Types_t Convert::getTypes()
{
Types_t aTypes( maMap.size() );
transform( maMap.begin(), maMap.end(), aTypes.getArray(),
- [] (::std::pair<const Type_t, Convert_t>& mpair) -> Type_t
- { return mpair.first; }
- );
+ o3tl::select1st<Map_t::value_type>() );
return aTypes;
}
diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx
index ac5081a79378..55c45b67686e 100644
--- a/forms/source/xforms/datatyperepository.cxx
+++ b/forms/source/xforms/datatyperepository.cxx
@@ -29,6 +29,7 @@
#include <functional>
#include <algorithm>
+#include <o3tl/compat_functional.hxx>
namespace xforms
{
@@ -182,8 +183,7 @@ namespace xforms
m_aRepository.begin(),
m_aRepository.end(),
aNames.getArray(),
- [](::std::pair<const OUString, DataType>& rpair) -> OUString
- { return rpair.first; }
+ ::o3tl::select1st< Repository::value_type >()
);
return aNames;
}