From f23daa8262b01f5dfe41f3bf11155816a674b689 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Sat, 19 Jan 2019 16:47:48 -0500 Subject: [PATCH] marked final error category classes, avoid -Wnon-virtual-dtor --- src/bdecode.cpp | 2 +- src/error_code.cpp | 4 ++-- src/gzip.cpp | 2 +- src/i2p_stream.cpp | 2 +- src/natpmp.cpp | 2 +- src/socks5_stream.cpp | 2 +- src/upnp.cpp | 2 +- src/utf8.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bdecode.cpp b/src/bdecode.cpp index d728b5421..78541dc1c 100644 --- a/src/bdecode.cpp +++ b/src/bdecode.cpp @@ -157,7 +157,7 @@ namespace { } - struct bdecode_error_category : boost::system::error_category + struct bdecode_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; std::string message(int ev) const override; diff --git a/src/error_code.cpp b/src/error_code.cpp index 33ffe29e5..057207da5 100644 --- a/src/error_code.cpp +++ b/src/error_code.cpp @@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { - struct libtorrent_error_category : boost::system::error_category + struct libtorrent_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; std::string message(int ev) const override; @@ -282,7 +282,7 @@ namespace libtorrent { return libtorrent_category; } - struct TORRENT_EXPORT http_error_category : boost::system::error_category + struct http_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "http"; } diff --git a/src/gzip.cpp b/src/gzip.cpp index 5fe0b8306..015079553 100644 --- a/src/gzip.cpp +++ b/src/gzip.cpp @@ -55,7 +55,7 @@ namespace { namespace libtorrent { - struct gzip_error_category : boost::system::error_category + struct gzip_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override; std::string message(int ev) const override; diff --git a/src/i2p_stream.cpp b/src/i2p_stream.cpp index 349e3a505..0bbe7a2ce 100644 --- a/src/i2p_stream.cpp +++ b/src/i2p_stream.cpp @@ -51,7 +51,7 @@ using namespace std::placeholders; namespace libtorrent { - struct i2p_error_category : boost::system::error_category + struct i2p_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "i2p error"; } diff --git a/src/natpmp.cpp b/src/natpmp.cpp index baf16e8a1..1226bceba 100644 --- a/src/natpmp.cpp +++ b/src/natpmp.cpp @@ -62,7 +62,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { -struct TORRENT_EXPORT pcp_error_category : boost::system::error_category +struct pcp_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "pcp error"; } diff --git a/src/socks5_stream.cpp b/src/socks5_stream.cpp index a13dd4bf5..fb850e465 100644 --- a/src/socks5_stream.cpp +++ b/src/socks5_stream.cpp @@ -43,7 +43,7 @@ namespace libtorrent { { return {e, socks_category()}; } } - struct socks_error_category : boost::system::error_category + struct socks_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override { return "socks"; } diff --git a/src/upnp.cpp b/src/upnp.cpp index b37a65f91..21b236ccf 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -1173,7 +1173,7 @@ namespace { } -struct upnp_error_category : boost::system::error_category +struct upnp_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override { diff --git a/src/utf8.cpp b/src/utf8.cpp index f7938742e..9f9680d28 100644 --- a/src/utf8.cpp +++ b/src/utf8.cpp @@ -178,7 +178,7 @@ namespace { } }; - struct utf8_error_category : boost::system::error_category + struct utf8_error_category final : boost::system::error_category { const char* name() const BOOST_SYSTEM_NOEXCEPT override {