fix deprecation markups

This commit is contained in:
arvidn 2018-04-28 16:51:50 +02:00 committed by Arvid Norberg
parent 927647acc5
commit 33bf3c827f
5 changed files with 38 additions and 17 deletions

View File

@ -104,7 +104,6 @@ namespace libtorrent {
public: public:
std::string TORRENT_DEPRECATED_MEMBER name; std::string TORRENT_DEPRECATED_MEMBER name;
#endif #endif
}; };
// The peer alert is a base class for alerts that refer to a specific peer. It includes all // The peer alert is a base class for alerts that refer to a specific peer. It includes all
@ -130,7 +129,7 @@ namespace libtorrent {
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
// The peer's IP address and port. // The peer's IP address and port.
aux::noexcept_movable<tcp::endpoint> ip; aux::noexcept_movable<tcp::endpoint> TORRENT_DEPRECATED_MEMBER ip;
#endif #endif
}; };
@ -247,7 +246,7 @@ namespace libtorrent {
int const size; int const size;
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
error_code ec; error_code TORRENT_DEPRECATED_MEMBER ec;
#endif #endif
}; };
@ -484,7 +483,7 @@ namespace libtorrent {
aux::allocation_slot m_msg_idx; aux::allocation_slot m_msg_idx;
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
public: public:
int const status_code; int const TORRENT_DEPRECATED_MEMBER status_code;
std::string TORRENT_DEPRECATED_MEMBER msg; std::string TORRENT_DEPRECATED_MEMBER msg;
#endif #endif
}; };
@ -1101,7 +1100,7 @@ namespace libtorrent {
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
// points to the resume data. // points to the resume data.
std::shared_ptr<entry> resume_data; std::shared_ptr<entry> TORRENT_DEPRECATED_MEMBER resume_data;
#endif #endif
}; };
@ -1361,7 +1360,15 @@ namespace libtorrent {
struct TORRENT_EXPORT listen_failed_alert final : alert struct TORRENT_EXPORT listen_failed_alert final : alert
{ {
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
enum socket_type_t : std::uint8_t { tcp, tcp_ssl, udp, i2p, socks5, utp_ssl }; enum socket_type_t : std::uint8_t
{
tcp TORRENT_DEPRECATED_ENUM,
tcp_ssl TORRENT_DEPRECATED_ENUM,
udp TORRENT_DEPRECATED_ENUM,
i2p TORRENT_DEPRECATED_ENUM,
socks5 TORRENT_DEPRECATED_ENUM,
utp_ssl TORRENT_DEPRECATED_ENUM
};
#endif #endif
// internal // internal
@ -1439,7 +1446,15 @@ namespace libtorrent {
struct TORRENT_EXPORT listen_succeeded_alert final : alert struct TORRENT_EXPORT listen_succeeded_alert final : alert
{ {
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
enum socket_type_t : std::uint8_t { tcp, tcp_ssl, udp, i2p, socks5, utp_ssl }; enum socket_type_t : std::uint8_t
{
tcp TORRENT_DEPRECATED_ENUM,
tcp_ssl TORRENT_DEPRECATED_ENUM,
udp TORRENT_DEPRECATED_ENUM,
i2p TORRENT_DEPRECATED_ENUM,
socks5 TORRENT_DEPRECATED_ENUM,
utp_ssl TORRENT_DEPRECATED_ENUM
};
#endif #endif
// internal // internal
@ -1474,10 +1489,10 @@ namespace libtorrent {
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
// the endpoint libtorrent ended up listening on. The address // the endpoint libtorrent ended up listening on. The address
// refers to the local interface and the port is the listen port. // refers to the local interface and the port is the listen port.
aux::noexcept_movable<tcp::endpoint> endpoint; aux::noexcept_movable<tcp::endpoint> TORRENT_DEPRECATED_MEMBER endpoint;
// the type of listen socket this alert refers to. // the type of listen socket this alert refers to.
socket_type_t sock_type; socket_type_t TORRENT_DEPRECATED_MEMBER sock_type;
#endif #endif
}; };
@ -1544,7 +1559,7 @@ namespace libtorrent {
portmap_transport const map_transport; portmap_transport const map_transport;
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
enum protocol_t enum TORRENT_DEPRECATED_ENUM protocol_t
{ {
tcp, tcp,
udp udp
@ -2028,12 +2043,19 @@ namespace libtorrent {
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif #endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif #endif
TORRENT_DEFINE_ALERT_PRIO(session_stats_alert, 70) TORRENT_DEFINE_ALERT_PRIO(session_stats_alert, 70)
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif #endif
static constexpr alert_category_t static_category = alert::stats_notification; static constexpr alert_category_t static_category = alert::stats_notification;
@ -2052,11 +2074,9 @@ namespace libtorrent {
#ifdef TORRENT_NO_DEPRECATE #ifdef TORRENT_NO_DEPRECATE
private: private:
// TODO: allocate this on the alert_stack in the future
std::array<std::int64_t, counters::num_counters> const values;
#else
std::array<std::int64_t, counters::num_counters> const TORRENT_DEPRECATED_MEMBER values;
#endif #endif
// TODO: allocate this on the alert_stack in the future
std::array<std::int64_t, counters::num_counters> const TORRENT_DEPRECATED_MEMBER values;
}; };
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE

View File

@ -103,7 +103,7 @@ namespace libtorrent {
TORRENT_EXPORT boost::system::error_category& bdecode_category(); TORRENT_EXPORT boost::system::error_category& bdecode_category();
#ifndef TORRENT_NO_DEPRECATED #ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED TORRENT_DEPRECATED
inline boost::system::error_category& get_bdecode_category() inline boost::system::error_category& get_bdecode_category()
{ return bdecode_category(); } { return bdecode_category(); }

View File

@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_IO_SERVICE_FWD_HPP_INCLUDED #define TORRENT_IO_SERVICE_FWD_HPP_INCLUDED
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include <boost/version.hpp>
#if defined TORRENT_BUILD_SIMULATOR #if defined TORRENT_BUILD_SIMULATOR
namespace sim { namespace asio { namespace sim { namespace asio {

View File

@ -87,7 +87,7 @@ namespace libtorrent {
// The torrent is in the queue for being checked. But there // The torrent is in the queue for being checked. But there
// currently is another torrent that are being checked. // currently is another torrent that are being checked.
// This torrent will wait for its turn. // This torrent will wait for its turn.
queued_for_checking, queued_for_checking TORRENT_DEPRECATED_ENUM,
#else #else
// internal // internal
unused_enum_for_backwards_compatibility, unused_enum_for_backwards_compatibility,

View File

@ -95,7 +95,7 @@ namespace libtorrent {
// the boost.system error category for UPnP errors // the boost.system error category for UPnP errors
TORRENT_EXPORT boost::system::error_category& upnp_category(); TORRENT_EXPORT boost::system::error_category& upnp_category();
#ifndef TORRENT_NO_DEPRECATED #ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED TORRENT_DEPRECATED
inline boost::system::error_category& get_upnp_category() inline boost::system::error_category& get_upnp_category()
{ return upnp_category(); } { return upnp_category(); }