diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 570e96b8a..2fe4dafdd 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -201,10 +201,10 @@ namespace libtorrent void add_ses_extension(boost::shared_ptr ext); #endif #if TORRENT_USE_ASSERTS - bool has_peer(peer_connection const* p) const; - bool any_torrent_has_peer(peer_connection const* p) const; + bool has_peer(peer_connection const* p) const TORRENT_OVERRIDE TORRENT_FINAL; + bool any_torrent_has_peer(peer_connection const* p) const TORRENT_OVERRIDE TORRENT_FINAL; bool is_single_thread() const { return single_threaded::is_single_thread(); } - bool is_posting_torrent_updates() const { return m_posting_torrent_updates; } + bool is_posting_torrent_updates() const TORRENT_OVERRIDE TORRENT_FINAL { return m_posting_torrent_updates; } // this is set while the session is building the // torrent status update message bool m_posting_torrent_updates; @@ -212,14 +212,15 @@ namespace libtorrent void open_listen_port(); - torrent_peer_allocator_interface* get_peer_allocator() { return &m_peer_allocator; } + torrent_peer_allocator_interface* get_peer_allocator() TORRENT_OVERRIDE TORRENT_FINAL + { return &m_peer_allocator; } - io_service& get_io_service() { return m_io_service; } - resolver_interface& get_resolver() { return m_host_resolver; } + io_service& get_io_service() TORRENT_OVERRIDE TORRENT_FINAL { return m_io_service; } + resolver_interface& get_resolver() TORRENT_OVERRIDE TORRENT_FINAL { return m_host_resolver; } void async_resolve(std::string const& host, int flags - , callback_t const& h); + , callback_t const& h) TORRENT_OVERRIDE TORRENT_FINAL; - std::vector& torrent_list(int i) + std::vector& torrent_list(int i) TORRENT_OVERRIDE TORRENT_FINAL { TORRENT_ASSERT(i >= 0); TORRENT_ASSERT(i < session_interface::num_torrent_lists); @@ -230,13 +231,13 @@ namespace libtorrent // attempts, because this torrent needs more peers. // this is typically done when a torrent starts out and // need the initial push to connect peers - void prioritize_connections(boost::weak_ptr t); + void prioritize_connections(boost::weak_ptr t) TORRENT_OVERRIDE TORRENT_FINAL; // if we are listening on an IPv6 interface // this will return one of the IPv6 addresses on this // machine, otherwise just an empty endpoint - tcp::endpoint get_ipv6_interface() const; - tcp::endpoint get_ipv4_interface() const; + tcp::endpoint get_ipv6_interface() const TORRENT_OVERRIDE TORRENT_FINAL; + tcp::endpoint get_ipv4_interface() const TORRENT_OVERRIDE TORRENT_FINAL; void async_accept(boost::shared_ptr const& listener, bool ssl); void on_accept_connection(boost::shared_ptr const& s @@ -252,14 +253,14 @@ namespace libtorrent void get_feeds(std::vector* f) const; #endif - boost::weak_ptr find_torrent(sha1_hash const& info_hash) const; + boost::weak_ptr find_torrent(sha1_hash const& info_hash) const TORRENT_OVERRIDE TORRENT_FINAL; boost::weak_ptr find_torrent(std::string const& uuid) const; #ifndef TORRENT_DISABLE_MUTABLE_TORRENTS std::vector > find_collection( - std::string const& collection) const; + std::string const& collection) const TORRENT_OVERRIDE TORRENT_FINAL; #endif - boost::weak_ptr find_disconnect_candidate_torrent() const; - int num_torrents() const { return m_torrents.size(); } + boost::weak_ptr find_disconnect_candidate_torrent() const TORRENT_OVERRIDE TORRENT_FINAL; + int num_torrents() const TORRENT_OVERRIDE TORRENT_FINAL { return m_torrents.size(); } void insert_torrent(sha1_hash const& ih, boost::shared_ptr const& t , std::string uuid); @@ -280,15 +281,15 @@ namespace libtorrent void apply_settings_pack(boost::shared_ptr pack); void apply_settings_pack_impl(settings_pack const& pack); - session_settings const& settings() const { return m_settings; } + session_settings const& settings() const TORRENT_OVERRIDE TORRENT_FINAL { return m_settings; } settings_pack get_settings() const; #ifndef TORRENT_DISABLE_DHT - dht::dht_tracker* dht() { return m_dht.get(); } - bool announce_dht() const { return !m_listen_sockets.empty(); } + dht::dht_tracker* dht() TORRENT_OVERRIDE TORRENT_FINAL { return m_dht.get(); } + bool announce_dht() const TORRENT_OVERRIDE TORRENT_FINAL { return !m_listen_sockets.empty(); } void add_dht_node_name(std::pair const& node); - void add_dht_node(udp::endpoint n); + void add_dht_node(udp::endpoint n) TORRENT_OVERRIDE TORRENT_FINAL; void add_dht_router(std::pair const& node); void set_dht_settings(dht_settings const& s); dht_settings const& get_dht_settings() const { return m_dht_settings; } @@ -296,12 +297,12 @@ namespace libtorrent void start_dht(); void stop_dht(); void start_dht(entry const& startup_state); - bool has_dht() const; + bool has_dht() const TORRENT_OVERRIDE TORRENT_FINAL; // this is called for torrents when they are started // it will prioritize them for announcing to // the DHT, to get the initial peers quickly - void prioritize_dht(boost::weak_ptr t); + void prioritize_dht(boost::weak_ptr t) TORRENT_OVERRIDE TORRENT_FINAL; void get_immutable_callback(sha1_hash target , dht::item const& i); @@ -365,8 +366,8 @@ namespace libtorrent ip_filter const& get_ip_filter(); void set_port_filter(port_filter const& f); - port_filter const& get_port_filter() const TORRENT_OVERRIDE; - void ban_ip(address addr) TORRENT_OVERRIDE; + port_filter const& get_port_filter() const TORRENT_OVERRIDE TORRENT_FINAL; + void ban_ip(address addr) TORRENT_OVERRIDE TORRENT_FINAL; void queue_tracker_request(tracker_request& req , boost::weak_ptr c); @@ -571,23 +572,23 @@ namespace libtorrent // implements dht_observer virtual void set_external_address(address const& ip - , address const& source) TORRENT_OVERRIDE; - virtual address external_address() TORRENT_OVERRIDE; - virtual void get_peers(sha1_hash const& ih) TORRENT_OVERRIDE; - virtual void announce(sha1_hash const& ih, address const& addr, int port) TORRENT_OVERRIDE; + , address const& source) TORRENT_OVERRIDE TORRENT_FINAL; + virtual address external_address() TORRENT_OVERRIDE TORRENT_FINAL; + virtual void get_peers(sha1_hash const& ih) TORRENT_OVERRIDE TORRENT_FINAL; + virtual void announce(sha1_hash const& ih, address const& addr, int port) TORRENT_OVERRIDE TORRENT_FINAL; virtual void outgoing_get_peers(sha1_hash const& target - , sha1_hash const& sent_target, udp::endpoint const& ep) TORRENT_OVERRIDE; + , sha1_hash const& sent_target, udp::endpoint const& ep) TORRENT_OVERRIDE TORRENT_FINAL; virtual void log(libtorrent::dht::dht_logger::module_t m, char const* fmt, ...) - TORRENT_OVERRIDE TORRENT_FORMAT(3,4); + TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(3,4); virtual void log_packet(message_direction_t dir, char const* pkt, int len - , udp::endpoint node) TORRENT_OVERRIDE; + , udp::endpoint node) TORRENT_OVERRIDE TORRENT_FINAL; virtual bool on_dht_request(char const* query, int query_len , dht::msg const& request, entry& response); void set_external_address(address const& ip , int source_type, address const& source); - virtual external_ip const& external_address() const TORRENT_OVERRIDE; + virtual external_ip const& external_address() const TORRENT_OVERRIDE TORRENT_FINAL; // used when posting synchronous function // calls to session_impl and torrent objects @@ -600,7 +601,7 @@ namespace libtorrent // uncork all peers added to the delayed uncork queue // implements uncork_interface - virtual void do_delayed_uncork() TORRENT_OVERRIDE; + virtual void do_delayed_uncork() TORRENT_OVERRIDE TORRENT_FINAL; void post_socket_job(socket_job& j); @@ -1134,8 +1135,8 @@ namespace libtorrent boost::uint16_t m_tick_residual; #ifndef TORRENT_DISABLE_LOGGING - virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3); - virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_FORMAT(2,0); + virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3) TORRENT_OVERRIDE TORRENT_FINAL; + virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_FORMAT(2,0) TORRENT_OVERRIDE TORRENT_FINAL; // this list of tracker loggers serves as tracker_callbacks when // shutting down. This list is just here to keep them alive during @@ -1145,8 +1146,8 @@ namespace libtorrent // TODO: 2 the throttling of saving resume data could probably be // factored out into a separate class - void queue_async_resume_data(boost::shared_ptr const& t); - void done_async_resume(); + virtual void queue_async_resume_data(boost::shared_ptr const& t) TORRENT_OVERRIDE TORRENT_FINAL; + virtual void done_async_resume() TORRENT_OVERRIDE TORRENT_FINAL; void async_resume_dispatched(); // state for keeping track of external IPs diff --git a/include/libtorrent/string_util.hpp b/include/libtorrent/string_util.hpp index b81d6af97..bfe315b03 100644 --- a/include/libtorrent/string_util.hpp +++ b/include/libtorrent/string_util.hpp @@ -34,12 +34,17 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_STRING_UTIL_HPP_INCLUDED #include "libtorrent/config.hpp" + +#include "libtorrent/aux_/disable_warnings_push.hpp" + #include #include #include #include #include // for boost::array +#include "libtorrent/aux_/disable_warnings_pop.hpp" + namespace libtorrent { TORRENT_EXTRA_EXPORT bool is_alpha(char c); diff --git a/test/test_bencoding.cpp b/test/test_bencoding.cpp index c9d369c22..7d1cc2c8f 100644 --- a/test/test_bencoding.cpp +++ b/test/test_bencoding.cpp @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "libtorrent/bencode.hpp" -#include + #include #include diff --git a/test/test_hasher.cpp b/test/test_hasher.cpp index 03e5178b6..35d1c2b46 100644 --- a/test/test_hasher.cpp +++ b/test/test_hasher.cpp @@ -31,7 +31,6 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "libtorrent/hasher.hpp" -#include #include "libtorrent/hex.hpp" // from_hex #include "test.hpp" diff --git a/test/test_ssl.cpp b/test/test_ssl.cpp index 6dc6c9b72..7dd7d7261 100644 --- a/test/test_ssl.cpp +++ b/test/test_ssl.cpp @@ -36,12 +36,16 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/file.hpp" #include "libtorrent/session_status.hpp" #include "libtorrent/torrent_info.hpp" -#include -#include #include "test.hpp" #include "test_utils.hpp" #include "setup_transfer.hpp" + +#include "libtorrent/aux_/disable_warnings_push.hpp" + +#include +#include + #include #include #include @@ -50,6 +54,8 @@ POSSIBILITY OF SUCH DAMAGE. #include // for asio::error::get_ssl_category() #include +#include "libtorrent/aux_/disable_warnings_pop.hpp" + using namespace libtorrent; using boost::tuples::ignore;