From 2e15b3edfab82fc64bab8d64f4a8aa163d6edb52 Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 7 Jan 2020 18:10:54 +0100 Subject: [PATCH] use span in expand_unspecified_address --- include/libtorrent/aux_/session_impl.hpp | 3 ++- src/session_impl.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 5bd941f8b..e248d695b 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -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 const& ifs + span ifs , std::vector& eps); // this is the link between the main thread and the diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 330965a9f..10f757b83 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -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 const& ifs + void expand_unspecified_address(span const ifs , std::vector& eps) { auto unspecified_begin = std::partition(eps.begin(), eps.end()