diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 4ebf6bf1a..4944ecdc0 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -33,12 +33,10 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_SESSION_IMPL_HPP_INCLUDED #define TORRENT_SESSION_IMPL_HPP_INCLUDED -#include #include #include #include #include -#include #ifndef TORRENT_DISABLE_GEO_IP #include "libtorrent/GeoIP.h" @@ -48,8 +46,6 @@ POSSIBILITY OF SUCH DAMAGE. #pragma warning(push, 1) #endif -#include -#include #include #include #include @@ -64,13 +60,11 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/socket.hpp" #include "libtorrent/peer_id.hpp" #include "libtorrent/tracker_manager.hpp" -#include "libtorrent/alert.hpp" #include "libtorrent/debug.hpp" #include "libtorrent/piece_block_progress.hpp" #include "libtorrent/ip_filter.hpp" #include "libtorrent/config.hpp" #include "libtorrent/session_settings.hpp" -#include "libtorrent/kademlia/dht_tracker.hpp" #include "libtorrent/session_status.hpp" #include "libtorrent/session.hpp" #include "libtorrent/stat.hpp" @@ -79,6 +73,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/socket_type.hpp" #include "libtorrent/connection_queue.hpp" #include "libtorrent/disk_io_thread.hpp" +#include "libtorrent/udp_socket.hpp" #include "libtorrent/assert.hpp" namespace libtorrent @@ -91,6 +86,7 @@ namespace libtorrent class lsd; struct fingerprint; class torrent; + class alert; namespace dht { diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index e3f7d989a..7bb501bfc 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -33,12 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_BANDWIDTH_MANAGER_HPP_INCLUDED #define TORRENT_BANDWIDTH_MANAGER_HPP_INCLUDED -#include #include -#include -#include -#include -#include #ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT #include @@ -50,10 +45,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/bandwidth_limit.hpp" #include "libtorrent/bandwidth_queue_entry.hpp" -using boost::weak_ptr; -using boost::shared_ptr; using boost::intrusive_ptr; -using boost::bind; namespace libtorrent { diff --git a/include/libtorrent/bt_peer_connection.hpp b/include/libtorrent/bt_peer_connection.hpp index bddc89ba8..6d9d72e72 100644 --- a/include/libtorrent/bt_peer_connection.hpp +++ b/include/libtorrent/bt_peer_connection.hpp @@ -37,7 +37,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include "libtorrent/debug.hpp" @@ -363,7 +362,7 @@ private: }; static bool range_below_zero(const range& r) { return r.start < 0; } - std::deque m_payloads; + std::vector m_payloads; #ifndef TORRENT_DISABLE_EXTENSIONS // this is set to true if the handshake from diff --git a/include/libtorrent/kademlia/routing_table.hpp b/include/libtorrent/kademlia/routing_table.hpp index 5c86a0545..ac6c6d2dc 100644 --- a/include/libtorrent/kademlia/routing_table.hpp +++ b/include/libtorrent/kademlia/routing_table.hpp @@ -34,7 +34,6 @@ POSSIBILITY OF SUCH DAMAGE. #define ROUTING_TABLE_HPP #include -#include #include #include diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index c53859342..2213b9ea9 100644 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include "libtorrent/debug.hpp" @@ -265,7 +264,7 @@ namespace libtorrent std::vector const& download_queue() const; std::vector const& request_queue() const; - std::deque const& upload_queue() const; + std::vector const& upload_queue() const; // estimate of how long it will take until we have // received all piece requests that we have sent @@ -734,7 +733,7 @@ namespace libtorrent // the queue of requests we have got // from this peer - std::deque m_requests; + std::vector m_requests; // the blocks we have reserved in the piece // picker and will request from this peer. diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 892740424..4c1f968ed 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -33,19 +33,14 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_SESSION_HPP_INCLUDED #define TORRENT_SESSION_HPP_INCLUDED -#include #include #include -#include -#include -#include #ifdef _MSC_VER #pragma warning(push, 1) #endif #include -#include #include #include @@ -56,17 +51,19 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/config.hpp" #include "libtorrent/torrent_handle.hpp" #include "libtorrent/entry.hpp" -#include "libtorrent/alert.hpp" #include "libtorrent/session_status.hpp" #include "libtorrent/version.hpp" #include "libtorrent/fingerprint.hpp" -#include "libtorrent/time.hpp" #include "libtorrent/disk_io_thread.hpp" #include "libtorrent/peer_id.hpp" #include "libtorrent/storage.hpp" #include +#ifndef TORRENT_NO_DEPRECATE +#include "libtorrent/alert.hpp" +#endif + #ifdef _MSC_VER # include #endif @@ -80,6 +77,7 @@ namespace libtorrent class connection_queue; class natpmp; class upnp; + class alert; // this is used to create linker errors when trying to link to // a library with a conflicting build configuration than the application diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 84b03c550..dc122fa73 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -2953,7 +2953,7 @@ namespace libtorrent int amount_payload = 0; if (!m_payloads.empty()) { - for (std::deque::iterator i = m_payloads.begin(); + for (std::vector::iterator i = m_payloads.begin(); i != m_payloads.end(); ++i) { i->start -= bytes_transferred; @@ -3017,7 +3017,7 @@ namespace libtorrent if (!m_payloads.empty()) { - for (std::deque::const_iterator i = m_payloads.begin(); + for (std::vector::const_iterator i = m_payloads.begin(); i != m_payloads.end() - 1; ++i) { TORRENT_ASSERT(i->start + i->length <= (i+1)->start); diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 96c54827a..c0c7a979b 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -31,7 +31,6 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "libtorrent/storage.hpp" -#include #include "libtorrent/disk_io_thread.hpp" #include "libtorrent/disk_buffer_holder.hpp" #include "libtorrent/alloca.hpp" diff --git a/src/kademlia/routing_table.cpp b/src/kademlia/routing_table.cpp index d0dde5416..8ea09848c 100644 --- a/src/kademlia/routing_table.cpp +++ b/src/kademlia/routing_table.cpp @@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/pch.hpp" #include -#include #include #include #include diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 46e0a50c5..d2de8daf5 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -758,7 +758,7 @@ namespace libtorrent return m_download_queue; } - std::deque const& peer_connection::upload_queue() const + std::vector const& peer_connection::upload_queue() const { return m_requests; } @@ -2130,7 +2130,7 @@ namespace libtorrent << " <== CANCEL [ piece: " << r.piece << " | s: " << r.start << " | l: " << r.length << " ]\n"; #endif - std::deque::iterator i + std::vector::iterator i = std::find(m_requests.begin(), m_requests.end(), r); if (i != m_requests.end()) @@ -2496,7 +2496,7 @@ namespace libtorrent // reject the requests we have in the queue // except the allowed fast pieces - for (std::deque::iterator i = m_requests.begin(); + for (std::vector::iterator i = m_requests.begin(); i != m_requests.end();) { if (m_accept_fast.count(i->piece)) diff --git a/src/torrent.cpp b/src/torrent.cpp index ee87d9948..c0fc823ac 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -76,6 +76,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/instantiate_connection.hpp" #include "libtorrent/assert.hpp" #include "libtorrent/broadcast_socket.hpp" +#include "libtorrent/kademlia/dht_tracker.hpp" #if TORRENT_USE_IOSTREAM #include