summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <404610+tatsuhiro-t@users.noreply.github.com>2023-09-16 16:50:14 +0900
committerGitHub <noreply@github.com>2023-09-16 16:50:14 +0900
commitef28a269aede860f61e737cb7d1bcddcee30a97b (patch)
tree7b9bfbf44d8c0ab32b0abd2cf8b748c9779a8c28
parentea6d4240d04da8b0046fda3333a92d64dd39d536 (diff)
parent8956c58d126a4e57e114f69ba6a5961724b7a817 (diff)
Merge pull request #2093 from aria2/remove-deprecated-unary-binary-fun
Remove deprecated std::unary_function and std::binary_function
-rw-r--r--src/ConsoleStatCalc.h2
-rw-r--r--src/CookieStorage.cc2
-rw-r--r--src/MetalinkEntry.cc3
-rw-r--r--src/a2functional.h3
4 files changed, 4 insertions, 6 deletions
diff --git a/src/ConsoleStatCalc.h b/src/ConsoleStatCalc.h
index 3940ef0e..76bfd5b7 100644
--- a/src/ConsoleStatCalc.h
+++ b/src/ConsoleStatCalc.h
@@ -45,7 +45,7 @@
namespace aria2 {
-class SizeFormatter : public std::unary_function<int64_t, std::string> {
+class SizeFormatter {
protected:
virtual std::string format(int64_t size) const = 0;
diff --git a/src/CookieStorage.cc b/src/CookieStorage.cc
index 56db33ed..3dbafdec 100644
--- a/src/CookieStorage.cc
+++ b/src/CookieStorage.cc
@@ -352,7 +352,7 @@ public:
} // namespace
namespace {
-class OrderByPathDepthDesc : public std::binary_function<Cookie, Cookie, bool> {
+class OrderByPathDepthDesc {
public:
bool operator()(const CookiePathDivider& lhs,
const CookiePathDivider& rhs) const
diff --git a/src/MetalinkEntry.cc b/src/MetalinkEntry.cc
index 3567f06d..d18afd22 100644
--- a/src/MetalinkEntry.cc
+++ b/src/MetalinkEntry.cc
@@ -102,8 +102,7 @@ void MetalinkEntry::reorderMetaurlsByPriority()
}
namespace {
-class Supported
- : public std::unary_function<std::shared_ptr<MetalinkResource>, bool> {
+class Supported {
public:
bool operator()(const std::shared_ptr<MetalinkResource>& res) const
{
diff --git a/src/a2functional.h b/src/a2functional.h
index c1059fef..bacfff57 100644
--- a/src/a2functional.h
+++ b/src/a2functional.h
@@ -102,8 +102,7 @@ std::string strjoin(InputIterator first, InputIterator last,
return result;
}
-template <typename T>
-class LeastRecentAccess : public std::binary_function<T, T, bool> {
+template <typename T> class LeastRecentAccess {
public:
bool operator()(const std::shared_ptr<T>& lhs,
const std::shared_ptr<T>& rhs) const