diff --git a/src/bdecode.cpp b/src/bdecode.cpp index 4baf3f0f4..3b1028e65 100644 --- a/src/bdecode.cpp +++ b/src/bdecode.cpp @@ -159,7 +159,7 @@ namespace { struct bdecode_error_category : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override; + std::string message(int ev) const override; boost::system::error_condition default_error_condition( int ev) const BOOST_SYSTEM_NOEXCEPT override { return boost::system::error_condition(ev, *this); } @@ -170,7 +170,7 @@ namespace { return "bdecode error"; } - std::string bdecode_error_category::message(int ev) const BOOST_SYSTEM_NOEXCEPT + std::string bdecode_error_category::message(int ev) const { static char const* msgs[] = { diff --git a/src/block_cache.cpp b/src/block_cache.cpp index 42c1b180e..97dab9c37 100644 --- a/src/block_cache.cpp +++ b/src/block_cache.cpp @@ -44,7 +44,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/aux_/block_cache_reference.hpp" #include "libtorrent/aux_/numeric_cast.hpp" +#include "libtorrent/aux_/disable_warnings_push.hpp" #include +#include "libtorrent/aux_/disable_warnings_pop.hpp" /* diff --git a/src/error_code.cpp b/src/error_code.cpp index f39bc42ef..ed02447de 100644 --- a/src/error_code.cpp +++ b/src/error_code.cpp @@ -39,7 +39,7 @@ namespace libtorrent { struct libtorrent_error_category : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override; + std::string message(int ev) const override; boost::system::error_condition default_error_condition(int ev) const BOOST_SYSTEM_NOEXCEPT override { return boost::system::error_condition(ev, *this); } }; @@ -49,7 +49,7 @@ namespace libtorrent { return "libtorrent"; } - std::string libtorrent_error_category::message(int ev) const BOOST_SYSTEM_NOEXCEPT + std::string libtorrent_error_category::message(int ev) const { static char const* msgs[] = { @@ -284,7 +284,7 @@ namespace libtorrent { { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "http error"; } - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override + std::string message(int ev) const override { std::string ret; ret += to_string(ev).data(); diff --git a/src/gzip.cpp b/src/gzip.cpp index 412cce2a1..f2b2ba9ca 100644 --- a/src/gzip.cpp +++ b/src/gzip.cpp @@ -59,7 +59,7 @@ namespace libtorrent { struct gzip_error_category : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override; + std::string message(int ev) const override; boost::system::error_condition default_error_condition(int ev) const BOOST_SYSTEM_NOEXCEPT override { return boost::system::error_condition(ev, *this); } }; @@ -69,7 +69,7 @@ namespace libtorrent { return "gzip error"; } - std::string gzip_error_category::message(int ev) const BOOST_SYSTEM_NOEXCEPT + std::string gzip_error_category::message(int ev) const { static char const* msgs[] = { diff --git a/src/i2p_stream.cpp b/src/i2p_stream.cpp index d04b0ac3b..7dfb194b9 100644 --- a/src/i2p_stream.cpp +++ b/src/i2p_stream.cpp @@ -55,7 +55,7 @@ namespace libtorrent { { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "i2p error"; } - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override + std::string message(int ev) const override { static char const* messages[] = { diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 6550cc6d5..59cab1fdc 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -4080,7 +4080,7 @@ namespace libtorrent { // 1 means unexpected disconnect/error // 2 protocol error (client sent something invalid) void peer_connection::disconnect(error_code const& ec - , operation_t op, int error) + , operation_t const op, int const error) { TORRENT_ASSERT(is_single_thread()); #if TORRENT_USE_ASSERTS diff --git a/src/socks5_stream.cpp b/src/socks5_stream.cpp index ffebac4ef..60868fd40 100644 --- a/src/socks5_stream.cpp +++ b/src/socks5_stream.cpp @@ -49,7 +49,7 @@ namespace libtorrent { { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "socks error"; } - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override + std::string message(int ev) const override { static char const* messages[] = { diff --git a/src/upnp.cpp b/src/upnp.cpp index 06719d65e..3c59677b3 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -1202,7 +1202,7 @@ struct upnp_error_category : boost::system::error_category return "UPnP error"; } - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override + std::string message(int ev) const override { int num_errors = sizeof(error_codes) / sizeof(error_codes[0]); error_code_t* end = error_codes + num_errors; diff --git a/src/utf8.cpp b/src/utf8.cpp index b99e91f1b..8b1ecf3c0 100644 --- a/src/utf8.cpp +++ b/src/utf8.cpp @@ -185,7 +185,7 @@ namespace { return "UTF error"; } - std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT override + std::string message(int ev) const override { static char const* error_messages[] = { "ok",