diff options
author | Glen Whitney <glen@studioinfinity.org> | 2022-10-25 15:53:19 (GMT) |
---|---|---|
committer | Mathias Gumz <mgumz@users.noreply.github.com> | 2024-11-25 20:23:51 (GMT) |
commit | 823ca2e181df0c056875c4c901a37d86b60b4256 (patch) | |
tree | 30f54ee20b3a7b37cfd328f1abd9ff1e8d944bf0 /src/FbTk/Compose.hh | |
parent | 06993a4ac8261f1ea6876d7593b14cf43103214b (diff) | |
download | fluxbox-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.hh | 12 |
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 |
31 | template <class A, class B> | 31 | template <class A, class B> |
32 | class Compose_base: public std::unary_function<typename B::argument_type, typename A::result_type> { | 32 | class Compose_base { |
33 | public: | 33 | public: |
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 | ||
44 | private: | 40 | private: |