diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-12-05 10:46:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-12-05 16:08:50 +0100 |
commit | 3ea3c081721439644850ded0fe375b12e2e9b95c (patch) | |
tree | c0b2780c61bbf7751d2375d10c6612dc798ab112 /dbaccess | |
parent | c7d3440fed86c7ef986cdaf57dfe2017325ff190 (diff) |
Replace deprecated std::bin2nd with lambda in dbaccess
(as std::bind2nd is gone by default at least from recent libc++ in C++17 mode)
Change-Id: Ib54bc40889aa45b5b9d4d3ab54baafbd260d3b25
Reviewed-on: https://gerrit.libreoffice.org/45861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/RowSetDrop.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index ca01482f9bb7..7fd72dbd7464 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1431,7 +1431,7 @@ sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) { std::vector< OUString>::const_iterator aIter = std::find_if( m_aChildNames.begin(), m_aChildNames.end(), - std::bind2nd(std::equal_to< OUString>(),rName)); + [&rName](OUString const & s) { return s == rName; }); if(aIter != m_aChildNames.end()) return aIter - m_aChildNames.begin(); @@ -1634,7 +1634,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const css::beans::PropertyChangeEv { std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(), m_aChildren.end(), - std::bind2nd(std::equal_to< css::uno::Reference< css::uno::XInterface > >(),evt.Source)); + [&evt](css::uno::Reference< css::uno::XInterface > const & x) { return x == evt.Source; }); if(aIter != m_aChildren.end()) { @@ -1654,7 +1654,7 @@ void SAL_CALL SbaXFormAdapter::disposing(const css::lang::EventObject& Source) std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(), m_aChildren.end(), - std::bind2nd(std::equal_to< css::uno::Reference< css::uno::XInterface > >(),Source.Source)); + [&Source](css::uno::Reference< css::uno::XInterface > const & x) { return x == Source.Source; }); if(aIter != m_aChildren.end()) removeByIndex(aIter - m_aChildren.begin()); } diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index bcaf2e42caab..aa1858a57d1b 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -28,7 +28,6 @@ #include <vcl/msgbox.hxx> #include <stringconstants.hxx> #include <com/sun/star/sdbc/XRowUpdate.hpp> -#include <functional> using namespace dbaui; using namespace ::com::sun::star::uno; @@ -102,7 +101,7 @@ bool ORowSetImportExport::Read() { // check if there is any column to copy if(std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(), - std::bind2nd(std::greater<sal_Int32>(),0)) == m_aColumnMapping.end()) + [](sal_Int32 n) { return n > 0; }) == m_aColumnMapping.end()) return false; bool bContinue = true; if(m_aSelection.getLength()) diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 8923a644bf21..26fe97d7423a 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -959,14 +959,14 @@ std::vector<VclPtr<OTableConnection> >::const_iterator OJoinTableView::getTableC { return std::find_if( m_vTableConnection.begin(), m_vTableConnection.end(), - std::bind2nd(std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); + [_pFromWin](OTableConnection * p) { return p->isTableConnection(_pFromWin); }); } sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) const { return std::count_if( m_vTableConnection.begin(), m_vTableConnection.end(), - std::bind2nd(std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); + [_pFromWin](OTableConnection * p) { return p->isTableConnection(_pFromWin); }); } bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const |