forked from premiere/premiere-libtorrent
fix msvc warning
This commit is contained in:
parent
1dcbeb2e60
commit
a647fd475e
|
@ -821,6 +821,11 @@ namespace libtorrent {
|
||||||
|
|
||||||
#if TORRENT_ABI_VERSION == 1
|
#if TORRENT_ABI_VERSION == 1
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push, 1)
|
||||||
|
// warning C4996: X: was declared deprecated
|
||||||
|
#pragma warning( disable : 4996 )
|
||||||
|
#endif
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
@ -834,6 +839,9 @@ namespace libtorrent {
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ``set_i2p_proxy`` sets the i2p_ proxy, and tries to open a persistent
|
// ``set_i2p_proxy`` sets the i2p_ proxy, and tries to open a persistent
|
||||||
|
|
|
@ -157,7 +157,12 @@ namespace std {
|
||||||
{
|
{
|
||||||
using base = std::hash<UnderlyingType>;
|
using base = std::hash<UnderlyingType>;
|
||||||
using argument_type = libtorrent::aux::strong_typedef<UnderlyingType, Tag>;
|
using argument_type = libtorrent::aux::strong_typedef<UnderlyingType, Tag>;
|
||||||
|
#if __cplusplus < 201402
|
||||||
|
// this was deprecated in C++17
|
||||||
using result_type = typename base::result_type;
|
using result_type = typename base::result_type;
|
||||||
|
#else
|
||||||
|
using result_type = std::size_t;
|
||||||
|
#endif
|
||||||
result_type operator()(argument_type const& s) const
|
result_type operator()(argument_type const& s) const
|
||||||
{ return this->base::operator()(static_cast<UnderlyingType>(s)); }
|
{ return this->base::operator()(static_cast<UnderlyingType>(s)); }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue