From d14e0d46e6b42d27f67e9d9227fe01d3ab2f2dcb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 5 Dec 2017 10:51:47 +0100 Subject: Replace deprecated std::bin2nd with lambda in forms (as std::bind2nd is gone by default at least from recent libc++ in C++17 mode) Change-Id: Ia2c7970fd10e328a8b4a09e101ac3a89876c3d69 Reviewed-on: https://gerrit.libreoffice.org/45863 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- forms/source/component/ListBox.cxx | 5 ++--- forms/source/richtext/richtextengine.cxx | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'forms') diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index b077847499a8..fd889c9d667d 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -57,7 +57,6 @@ #include #include -#include #include namespace frm @@ -468,11 +467,11 @@ namespace frm const OUString* pSelectedItemsPos = ::std::find_if( _rPropertyNames.begin(), _rPropertyNames.end(), - ::std::bind2nd( ::std::equal_to< OUString >(), PROPERTY_SELECT_SEQ ) + [](OUString const & s) { return s == PROPERTY_SELECT_SEQ; } ); const OUString* pStringItemListPos = ::std::find_if( _rPropertyNames.begin(), _rPropertyNames.end(), - ::std::bind2nd( ::std::equal_to< OUString >(), PROPERTY_STRINGITEMLIST ) + [](OUString const & s) { return s == PROPERTY_STRINGITEMLIST; } ); if ( ( pSelectedItemsPos != _rPropertyNames.end() ) && ( pStringItemListPos != _rPropertyNames.end() ) ) { diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index d920aa0fe485..0f583441e832 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -33,7 +33,6 @@ #include #include -#include #include namespace frm @@ -119,7 +118,7 @@ namespace frm ::std::vector< IEngineStatusListener* >::iterator aPos = ::std::find_if( m_aStatusListeners.begin(), m_aStatusListeners.end(), - ::std::bind2nd( ::std::equal_to< IEngineStatusListener* >( ), _pListener ) + [_pListener](IEngineStatusListener * p) { return p == _pListener; } ); OSL_ENSURE( aPos != m_aStatusListeners.end(), "RichTextEngine::revokeEngineStatusListener: listener not registered!" ); if ( aPos != m_aStatusListeners.end() ) -- cgit