use span in expand_unspecified_address

This commit is contained in:
arvidn 2020-01-07 18:10:54 +01:00 committed by Arvid Norberg
parent f508a433a4
commit 2e15b3edfa
2 changed files with 3 additions and 2 deletions

View File

@ -83,6 +83,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/portmap.hpp"
#include "libtorrent/aux_/lsd.hpp"
#include "libtorrent/flags.hpp"
#include "libtorrent/span.hpp"
#if TORRENT_ABI_VERSION == 1
#include "libtorrent/session_settings.hpp"
@ -258,7 +259,7 @@ namespace aux {
// expand [::] to all IPv6 interfaces for BEP 45 compliance
TORRENT_EXTRA_EXPORT void expand_unspecified_address(
std::vector<ip_interface> const& ifs
span<ip_interface const> ifs
, std::vector<listen_endpoint_t>& eps);
// this is the link between the main thread and the

View File

@ -245,7 +245,7 @@ namespace aux {
// are much less common and the presence of NAT means that we cannot
// automatically determine which interfaces should have DHT nodes started on
// 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)
{
auto unspecified_begin = std::partition(eps.begin(), eps.end()