diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index 7b3d0214b..dfacd8cb9 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -206,7 +206,7 @@ struct bandwidth_manager ++i->priority; ++i; } - m_queue.insert(i.base(), bw_queue_entry(peer, blk, priority)); + m_queue.insert(i.base(), bw_queue_entry(peer, blk, priority)); if (!m_queue.empty()) hand_out_bandwidth(l); } @@ -330,7 +330,7 @@ private: queue_t tmp; while (!m_queue.empty() && amount > 0) { - bw_queue_entry qe = m_queue.front(); + bw_queue_entry qe = m_queue.front(); TORRENT_ASSERT(qe.max_block_size > 0); m_queue.pop_front(); @@ -435,7 +435,7 @@ private: int m_current_quota; // these are the consumers that want bandwidth - typedef std::deque > queue_t; + typedef std::deque > queue_t; queue_t m_queue; // these are the consumers that have received bandwidth diff --git a/include/libtorrent/bandwidth_queue_entry.hpp b/include/libtorrent/bandwidth_queue_entry.hpp index f8b44846c..54f669062 100644 --- a/include/libtorrent/bandwidth_queue_entry.hpp +++ b/include/libtorrent/bandwidth_queue_entry.hpp @@ -37,16 +37,15 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { -template +template struct bw_queue_entry { - typedef typename PeerConnection::torrent_type torrent_type; bw_queue_entry(boost::intrusive_ptr const& pe , int blk, int prio) : peer(pe), torrent(peer->associated_torrent()) , max_block_size(blk), priority(prio) {} boost::intrusive_ptr peer; - boost::weak_ptr torrent; + boost::weak_ptr torrent; int max_block_size; int priority; // 0 is low prio }; diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index 35572f50e..8f9cde4e6 100755 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -98,8 +98,6 @@ namespace libtorrent friend class invariant_access; public: - typedef torrent torrent_type; - enum channels { upload_channel, diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 5d0439313..31b77aa55 100755 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -696,7 +696,7 @@ namespace libtorrent boost::scoped_ptr m_picker; // the queue of peer_connections that want more bandwidth - typedef std::deque > queue_t; + typedef std::deque > queue_t; queue_t m_bandwidth_queue[2]; std::vector m_trackers; diff --git a/src/torrent.cpp b/src/torrent.cpp index 76038e009..4e1dcfb23 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2299,7 +2299,7 @@ namespace libtorrent ++i->priority; ++i; } - m_bandwidth_queue[channel].insert(i.base(), bw_queue_entry( + m_bandwidth_queue[channel].insert(i.base(), bw_queue_entry( p, block_size, priority)); } } @@ -2315,7 +2315,7 @@ namespace libtorrent queue_t tmp; while (!m_bandwidth_queue[channel].empty()) { - bw_queue_entry qe = m_bandwidth_queue[channel].front(); + bw_queue_entry qe = m_bandwidth_queue[channel].front(); if (m_bandwidth_limit[channel].max_assignable() == 0) break; m_bandwidth_queue[channel].pop_front();