diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-12-05 10:51:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-12-05 16:17:58 +0100 |
commit | d14e0d46e6b42d27f67e9d9227fe01d3ab2f2dcb (patch) | |
tree | 7a7b26d472311d57a0ee17425c38e815b1beb880 /forms/source | |
parent | e2e8d201bb09e1bb4e654dcb7a701fe9840dbd94 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/ListBox.cxx | 5 | ||||
-rw-r--r-- | forms/source/richtext/richtextengine.cxx | 3 |
2 files changed, 3 insertions, 5 deletions
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 <boost/optional.hpp> #include <algorithm> -#include <functional> #include <iterator> 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 <svl/undo.hxx> #include <algorithm> -#include <functional> #include <memory> 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() ) |