use span in expand_unspecified_address
This commit is contained in:
parent
f508a433a4
commit
2e15b3edfa
|
@ -83,6 +83,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/aux_/portmap.hpp"
|
#include "libtorrent/aux_/portmap.hpp"
|
||||||
#include "libtorrent/aux_/lsd.hpp"
|
#include "libtorrent/aux_/lsd.hpp"
|
||||||
#include "libtorrent/flags.hpp"
|
#include "libtorrent/flags.hpp"
|
||||||
|
#include "libtorrent/span.hpp"
|
||||||
|
|
||||||
#if TORRENT_ABI_VERSION == 1
|
#if TORRENT_ABI_VERSION == 1
|
||||||
#include "libtorrent/session_settings.hpp"
|
#include "libtorrent/session_settings.hpp"
|
||||||
|
@ -258,7 +259,7 @@ namespace aux {
|
||||||
|
|
||||||
// expand [::] to all IPv6 interfaces for BEP 45 compliance
|
// expand [::] to all IPv6 interfaces for BEP 45 compliance
|
||||||
TORRENT_EXTRA_EXPORT void expand_unspecified_address(
|
TORRENT_EXTRA_EXPORT void expand_unspecified_address(
|
||||||
std::vector<ip_interface> const& ifs
|
span<ip_interface const> ifs
|
||||||
, std::vector<listen_endpoint_t>& eps);
|
, std::vector<listen_endpoint_t>& eps);
|
||||||
|
|
||||||
// this is the link between the main thread and the
|
// this is the link between the main thread and the
|
||||||
|
|
|
@ -245,7 +245,7 @@ namespace aux {
|
||||||
// are much less common and the presence of NAT means that we cannot
|
// are much less common and the presence of NAT means that we cannot
|
||||||
// automatically determine which interfaces should have DHT nodes started on
|
// automatically determine which interfaces should have DHT nodes started on
|
||||||
// them.
|
// them.
|
||||||
void expand_unspecified_address(std::vector<ip_interface> const& ifs
|
void expand_unspecified_address(span<ip_interface const> const ifs
|
||||||
, std::vector<listen_endpoint_t>& eps)
|
, std::vector<listen_endpoint_t>& eps)
|
||||||
{
|
{
|
||||||
auto unspecified_begin = std::partition(eps.begin(), eps.end()
|
auto unspecified_begin = std::partition(eps.begin(), eps.end()
|
||||||
|
|
Loading…
Reference in New Issue