diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2023-09-16 16:18:29 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2023-09-16 16:24:23 +0900 |
| commit | 8956c58d126a4e57e114f69ba6a5961724b7a817 (patch) | |
| tree | 7b9bfbf44d8c0ab32b0abd2cf8b748c9779a8c28 | |
| parent | ea6d4240d04da8b0046fda3333a92d64dd39d536 (diff) | |
Remove deprecated std::unary_function and std::binary_function
| -rw-r--r-- | src/ConsoleStatCalc.h | 2 | ||||
| -rw-r--r-- | src/CookieStorage.cc | 2 | ||||
| -rw-r--r-- | src/MetalinkEntry.cc | 3 | ||||
| -rw-r--r-- | src/a2functional.h | 3 |
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 |
