forked from premiere/premiere-libtorrent
fix build with std::tr1::array instead of boost::array
This commit is contained in:
parent
587de62205
commit
bf2e4df2b2
|
@ -195,8 +195,8 @@ namespace libtorrent
|
||||||
// both are v4
|
// both are v4
|
||||||
address_v4::bytes_type b1 = a1.to_v4().to_bytes();
|
address_v4::bytes_type b1 = a1.to_v4().to_bytes();
|
||||||
address_v4::bytes_type b2 = a2.to_v4().to_bytes();
|
address_v4::bytes_type b2 = a2.to_v4().to_bytes();
|
||||||
return address_v4::bytes_type::static_size * 8
|
return address_v4::bytes_type().size() * 8
|
||||||
- common_bits(b1.c_array(), b2.c_array(), b1.size());
|
- common_bits(b1.data(), b2.data(), b1.size());
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,8 +206,8 @@ namespace libtorrent
|
||||||
else b1 = a1.to_v6().to_bytes();
|
else b1 = a1.to_v6().to_bytes();
|
||||||
if (a2.is_v4()) b2 = address_v6::v4_mapped(a2.to_v4()).to_bytes();
|
if (a2.is_v4()) b2 = address_v6::v4_mapped(a2.to_v4()).to_bytes();
|
||||||
else b2 = a2.to_v6().to_bytes();
|
else b2 = a2.to_v6().to_bytes();
|
||||||
return address_v6::bytes_type::static_size * 8
|
return address_v6::bytes_type().size() * 8
|
||||||
- common_bits(b1.c_array(), b2.c_array(), b1.size());
|
- common_bits(b1.data(), b2.data(), b1.size());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1763,7 +1763,7 @@ namespace libtorrent
|
||||||
if (!myip.empty())
|
if (!myip.empty())
|
||||||
{
|
{
|
||||||
// TODO: don't trust this blindly
|
// TODO: don't trust this blindly
|
||||||
if (myip.size() == address_v4::bytes_type::static_size)
|
if (myip.size() == address_v4::bytes_type().size())
|
||||||
{
|
{
|
||||||
address_v4::bytes_type bytes;
|
address_v4::bytes_type bytes;
|
||||||
std::copy(myip.begin(), myip.end(), bytes.begin());
|
std::copy(myip.begin(), myip.end(), bytes.begin());
|
||||||
|
@ -1771,7 +1771,7 @@ namespace libtorrent
|
||||||
, aux::session_impl::source_peer, remote().address());
|
, aux::session_impl::source_peer, remote().address());
|
||||||
}
|
}
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
else if (myip.size() == address_v6::bytes_type::static_size)
|
else if (myip.size() == address_v6::bytes_type().size())
|
||||||
{
|
{
|
||||||
address_v6::bytes_type bytes;
|
address_v6::bytes_type bytes;
|
||||||
std::copy(myip.begin(), myip.end(), bytes.begin());
|
std::copy(myip.begin(), myip.end(), bytes.begin());
|
||||||
|
|
|
@ -508,10 +508,10 @@ namespace libtorrent
|
||||||
if (ip_ent)
|
if (ip_ent)
|
||||||
{
|
{
|
||||||
char const* p = ip_ent->string_ptr();
|
char const* p = ip_ent->string_ptr();
|
||||||
if (ip_ent->string_length() == address_v4::bytes_type::static_size)
|
if (ip_ent->string_length() == address_v4::bytes_type().size())
|
||||||
external_ip = detail::read_v4_address(p);
|
external_ip = detail::read_v4_address(p);
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
else if (ip_ent->string_length() == address_v6::bytes_type::static_size)
|
else if (ip_ent->string_length() == address_v6::bytes_type().size())
|
||||||
external_ip = detail::read_v6_address(p);
|
external_ip = detail::read_v6_address(p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue