fix deprecated warnings in msvc (#1272)
fix deprecated warnings in msvc and merge issue.
This commit is contained in:
parent
b97bb84a9f
commit
d1e916ec9e
|
@ -1839,6 +1839,15 @@ namespace libtorrent
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
// warning C4996: X: was declared deprecated
|
||||||
|
#pragma warning( disable : 4996 )
|
||||||
|
#endif
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
struct TORRENT_DEPRECATED TORRENT_EXPORT mmap_cache_alert final : alert
|
struct TORRENT_DEPRECATED TORRENT_EXPORT mmap_cache_alert final : alert
|
||||||
{
|
{
|
||||||
mmap_cache_alert(aux::stack_allocator& alloc
|
mmap_cache_alert(aux::stack_allocator& alloc
|
||||||
|
@ -1850,6 +1859,12 @@ namespace libtorrent
|
||||||
|
|
||||||
error_code const error;
|
error_code const error;
|
||||||
};
|
};
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The session_stats_alert is posted when the user requests session statistics by
|
// The session_stats_alert is posted when the user requests session statistics by
|
||||||
|
@ -1885,6 +1900,15 @@ namespace libtorrent
|
||||||
//
|
//
|
||||||
// Once this download completes, the ``torrent_update_alert`` is posted to
|
// Once this download completes, the ``torrent_update_alert`` is posted to
|
||||||
// notify the client of the info-hash changing.
|
// notify the client of the info-hash changing.
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
// warning C4996: X: was declared deprecated
|
||||||
|
#pragma warning( disable : 4996 )
|
||||||
|
#endif
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
struct TORRENT_DEPRECATED TORRENT_EXPORT torrent_update_alert final : torrent_alert
|
struct TORRENT_DEPRECATED TORRENT_EXPORT torrent_update_alert final : torrent_alert
|
||||||
{
|
{
|
||||||
// internal
|
// internal
|
||||||
|
@ -1900,6 +1924,12 @@ namespace libtorrent
|
||||||
sha1_hash old_ih;
|
sha1_hash old_ih;
|
||||||
sha1_hash new_ih;
|
sha1_hash new_ih;
|
||||||
};
|
};
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// posted when something fails in the DHT. This is not necessarily a fatal
|
// posted when something fails in the DHT. This is not necessarily a fatal
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace libtorrent
|
||||||
// don't have ``mmap`` this setting is ignored.
|
// don't have ``mmap`` this setting is ignored.
|
||||||
mmap_cache,
|
mmap_cache,
|
||||||
#else
|
#else
|
||||||
deprecated12,
|
deprecated21,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// this is the client name and version identifier sent to peers in the
|
// this is the client name and version identifier sent to peers in the
|
||||||
|
|
Loading…
Reference in New Issue