summaryrefslogtreecommitdiffstats
path: root/include/dbaccess
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-04 12:23:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 20:27:24 +0200
commitdb714f4d76cb71c1124eb2f4902a816168f6513b (patch)
tree83096269d9f0115aeca9b9f7bbe469e8fd741f71 /include/dbaccess
parentsc: remove trivial copy ctors for functors (diff)
downloadcore-db714f4d76cb71c1124eb2f4902a816168f6513b.tar.gz
core-db714f4d76cb71c1124eb2f4902a816168f6513b.zip
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.hxx22
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;
}
};