浏览代码

Removed specializations of std::swap(PeerEntry&, PeerEntry&).

Declaring std::swap(PeerEntry&, PeerEntry&) in class declaration
breaks under Mac OS X 10.5. They are also not used. So we simply
removed them.
Tatsuhiro Tsujikawa 15 年之前
父节点
当前提交
da8e0203b8
共有 4 个文件被更改,包括 0 次插入36 次删除
  1. 0 10
      src/BtLeecherStateChoke.cc
  2. 0 8
      src/BtLeecherStateChoke.h
  3. 0 10
      src/BtSeederStateChoke.cc
  4. 0 8
      src/BtSeederStateChoke.h

+ 0 - 10
src/BtLeecherStateChoke.cc

@@ -239,13 +239,3 @@ const Timer& BtLeecherStateChoke::getLastRound() const
 }
 
 } // namespace aria2
-
-namespace std {
-template<>
-void swap<aria2::BtLeecherStateChoke::PeerEntry>
-(aria2::BtLeecherStateChoke::PeerEntry& a,
- aria2::BtLeecherStateChoke::PeerEntry& b)
-{
-  a.swap(b);
-}
-} // namespace std;

+ 0 - 8
src/BtLeecherStateChoke.h

@@ -118,7 +118,6 @@ public:
   const Timer& getLastRound() const;
 
   friend void swap(PeerEntry& a, PeerEntry& b);
-  friend void std::swap<PeerEntry>(PeerEntry& a, PeerEntry& b);
 };
 
 void swap
@@ -127,11 +126,4 @@ void swap
 
 } // namespace aria2
 
-namespace std {
-template<>
-void swap<aria2::BtLeecherStateChoke::PeerEntry>
-(aria2::BtLeecherStateChoke::PeerEntry& a,
- aria2::BtLeecherStateChoke::PeerEntry& b);
-} // namespace std
-
 #endif // D_BT_LEECHER_STATE_CHOKE_H

+ 0 - 10
src/BtSeederStateChoke.cc

@@ -194,13 +194,3 @@ void swap
 }
 
 } // namespace aria2
-
-namespace std {
-template<>
-void swap<aria2::BtSeederStateChoke::PeerEntry>
-(aria2::BtSeederStateChoke::PeerEntry& a,
- aria2::BtSeederStateChoke::PeerEntry& b)
-{
-  a.swap(b);
-}
-} // namespace std

+ 0 - 8
src/BtSeederStateChoke.h

@@ -103,7 +103,6 @@ public:
   const Timer& getLastRound() const { return lastRound_; }
 
   friend void swap(PeerEntry& a, PeerEntry& b);
-  friend void std::swap<PeerEntry>(PeerEntry& a, PeerEntry& b);
 };
 
 void swap
@@ -112,11 +111,4 @@ void swap
 
 } // namespace aria2
 
-namespace std {
-template<>
-void swap<aria2::BtSeederStateChoke::PeerEntry>
-(aria2::BtSeederStateChoke::PeerEntry& a,
- aria2::BtSeederStateChoke::PeerEntry& b);
-} // namespace std
-
 #endif // D_BT_SEEDER_STATE_CHOKE_H