forked from premiere/premiere-libtorrent
some noexcept fixes
This commit is contained in:
parent
1ed68551d7
commit
d4864b8b18
|
@ -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[] =
|
||||
{
|
||||
|
|
|
@ -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 <boost/variant/get.hpp>
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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[] =
|
||||
{
|
||||
|
|
|
@ -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[] =
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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[] =
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue