forked from premiere/premiere-libtorrent
fix deprecated warning with msvc (#1265)
fix deprecated warning with msvc
This commit is contained in:
parent
b65c89a000
commit
877a47e03b
|
@ -11,6 +11,18 @@ void bind_fingerprint()
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
|
#endif
|
||||||
class_<fingerprint>("fingerprint", no_init)
|
class_<fingerprint>("fingerprint", no_init)
|
||||||
.def(
|
.def(
|
||||||
init<char const*,int,int,int,int>(
|
init<char const*,int,int,int,int>(
|
||||||
|
@ -24,6 +36,14 @@ void bind_fingerprint()
|
||||||
.def_readonly("revision_version", &fingerprint::revision_version)
|
.def_readonly("revision_version", &fingerprint::revision_version)
|
||||||
.def_readonly("tag_version", &fingerprint::tag_version)
|
.def_readonly("tag_version", &fingerprint::tag_version)
|
||||||
;
|
;
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
#endif // TORRENT_NO_DEPRECATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -362,6 +362,7 @@ namespace libtorrent
|
||||||
// functions on torrent_handle
|
// functions on torrent_handle
|
||||||
int max_uploads = -1;
|
int max_uploads = -1;
|
||||||
int max_connections = -1;
|
int max_connections = -1;
|
||||||
|
|
||||||
int upload_limit = -1;
|
int upload_limit = -1;
|
||||||
int download_limit = -1;
|
int download_limit = -1;
|
||||||
|
|
||||||
|
@ -403,6 +404,7 @@ namespace libtorrent
|
||||||
// have not received any scrape data.
|
// have not received any scrape data.
|
||||||
int num_complete = -1;
|
int num_complete = -1;
|
||||||
int num_incomplete = -1;
|
int num_incomplete = -1;
|
||||||
|
|
||||||
int num_downloaded = -1;
|
int num_downloaded = -1;
|
||||||
|
|
||||||
// URLs can be added to these two lists to specify additional web
|
// URLs can be added to these two lists to specify additional web
|
||||||
|
|
|
@ -66,6 +66,10 @@ namespace libtorrent
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
#endif
|
#endif
|
||||||
// Returns an optional fingerprint if any can be identified from the peer
|
// Returns an optional fingerprint if any can be identified from the peer
|
||||||
// id. This can be used to automate the identification of clients. It will
|
// id. This can be used to automate the identification of clients. It will
|
||||||
|
@ -81,6 +85,9 @@ namespace libtorrent
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // TORRENT_NO_DEPRECATE
|
#endif // TORRENT_NO_DEPRECATE
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,10 @@ namespace libtorrent
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
#endif
|
#endif
|
||||||
TORRENT_DEPRECATED
|
TORRENT_DEPRECATED
|
||||||
session(fingerprint const& print
|
session(fingerprint const& print
|
||||||
|
@ -323,6 +327,9 @@ namespace libtorrent
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif // TORRENT_NO_DEPRECATE
|
#endif // TORRENT_NO_DEPRECATE
|
||||||
|
|
||||||
// The destructor of session will notify all trackers that our torrents
|
// The destructor of session will notify all trackers that our torrents
|
||||||
|
|
Loading…
Reference in New Issue