some noexcept fixes

This commit is contained in:
arvidn 2017-11-10 00:46:03 +01:00 committed by Arvid Norberg
parent 1ed68551d7
commit d4864b8b18
9 changed files with 14 additions and 12 deletions

View File

@ -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[] =
{

View File

@ -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"
/*

View File

@ -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();

View File

@ -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[] =
{

View File

@ -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[] =
{

View File

@ -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

View File

@ -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[] =
{

View File

@ -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;

View File

@ -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",