Răsfoiți Sursa

Remove deprecated std::unary_function and std::binary_function

Tatsuhiro Tsujikawa 2 ani în urmă
părinte
comite
8956c58d12
4 a modificat fișierele cu 4 adăugiri și 6 ștergeri
  1. 1 1
      src/ConsoleStatCalc.h
  2. 1 1
      src/CookieStorage.cc
  3. 1 2
      src/MetalinkEntry.cc
  4. 1 2
      src/a2functional.h

+ 1 - 1
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;
 

+ 1 - 1
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

+ 1 - 2
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
   {

+ 1 - 2
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