aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Compose.hh
diff options
context:
space:
mode:
authorGlen Whitney <glen@studioinfinity.org>2022-10-25 15:53:19 (GMT)
committerMathias Gumz <mgumz@users.noreply.github.com>2024-11-25 20:23:51 (GMT)
commit823ca2e181df0c056875c4c901a37d86b60b4256 (patch)
tree30f54ee20b3a7b37cfd328f1abd9ff1e8d944bf0 /src/FbTk/Compose.hh
parent06993a4ac8261f1ea6876d7593b14cf43103214b (diff)
downloadfluxbox-823ca2e181df0c056875c4c901a37d86b60b4256.zip
fluxbox-823ca2e181df0c056875c4c901a37d86b60b4256.tar.bz2
chore: remove compiler warnings
Most warnings were caused by deprecated std library templates, especially std::mem_fun, std::bind1st, and std::bind2nd. These are replaced by their modern versions, std::mem_fn and std::bind.
Diffstat (limited to 'src/FbTk/Compose.hh')
-rw-r--r--src/FbTk/Compose.hh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/FbTk/Compose.hh b/src/FbTk/Compose.hh
index 04267e6..5bca2cb 100644
--- a/src/FbTk/Compose.hh
+++ b/src/FbTk/Compose.hh
@@ -29,16 +29,12 @@ namespace FbTk {
29/// Composes two functions into one. 29/// Composes two functions into one.
30/// Uses Arg for type B and then calls type A 30/// Uses Arg for type B and then calls type A
31template <class A, class B> 31template <class A, class B>
32class Compose_base: public std::unary_function<typename B::argument_type, typename A::result_type> { 32class Compose_base {
33public: 33public:
34 typedef typename A::result_type ResultTypeA;
35 typedef typename A::argument_type ArgumentTypeA;
36 typedef typename B::result_type ResultTypeB;
37 typedef typename B::argument_type ArgumentTypeB;
38
39 Compose_base(const A &a, const B &b):m_a(a), m_b(b) { } 34 Compose_base(const A &a, const B &b):m_a(a), m_b(b) { }
40 ResultTypeA operator () (const ArgumentTypeB &arg) const { 35 template <class ARG>
41 return m_a(m_b(arg)); 36 auto operator () (const ARG& arg) const {
37 return m_a(m_b(arg));
42 } 38 }
43 39
44private: 40private: