diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-07-04 12:23:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-04 20:27:24 +0200 |
commit | db714f4d76cb71c1124eb2f4902a816168f6513b (patch) | |
tree | 83096269d9f0115aeca9b9f7bbe469e8fd741f71 /include/dbaccess | |
parent | 27f61c4cfb88c23ef3c370921e6f9c186c602175 (diff) |
make binary functors unary, related tdf#108782
These functors were always used as unary functors with std::bind2nd.
This patch is a preparation of removal of deprecated
std::binary_function.
Change-Id: Ifd120227ab0a0db4c93dd56a9d46feb602b1ae4c
Reviewed-on: https://gerrit.libreoffice.org/39500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/dbaccess')
-rw-r--r-- | include/dbaccess/genericcontroller.hxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx index a23dfa8d4f70..20bbc7688210 100644 --- a/include/dbaccess/genericcontroller.hxx +++ b/include/dbaccess/genericcontroller.hxx @@ -24,7 +24,6 @@ #include <deque> #include <exception> -#include <functional> #include <map> #include <memory> #include <vector> @@ -177,12 +176,16 @@ namespace dbaui > SupportedFeatures; - struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool > + class CompareFeatureById { + const sal_Int32 m_nId; + public: + CompareFeatureById(sal_Int32 _nId) : m_nId(_nId) + {} - bool operator()( const SupportedFeatures::value_type& _aType, sal_Int32 _nId ) const + bool operator()( const SupportedFeatures::value_type& _aType ) const { - return !!( _nId == _aType.second.nFeatureId ); + return m_nId == _aType.second.nFeatureId; } }; @@ -199,12 +202,17 @@ namespace dbaui typedef ::std::deque< FeatureListener > FeatureListeners; - struct FindFeatureListener : ::std::binary_function< FeatureListener, css::uno::Reference< css::frame::XStatusListener >, bool > + class FindFeatureListener { + const css::uno::Reference< css::frame::XStatusListener >& m_xListener; + public: + FindFeatureListener(const css::uno::Reference< css::frame::XStatusListener >& _xListener) + : m_xListener(_xListener) + {} - bool operator()( const FeatureListener& lhs, const css::uno::Reference< css::frame::XStatusListener >& rhs ) const + bool operator()( const FeatureListener& lhs ) const { - return !!( lhs.xListener == rhs ); + return lhs.xListener == m_xListener; } }; |