From: Otto Moerbeek Date: Fri, 12 Jan 2024 09:42:13 +0000 (+0100) Subject: 1524920 COPY_INSTEAD_OF_MOVE X-Git-Tag: dnsdist-1.9.0-rc1~36^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bc2b3b102488609d9d62e4aaf84bf73b21d500e;p=thirdparty%2Fpdns.git 1524920 COPY_INSTEAD_OF_MOVE --- diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 171eb0a9e3..7fd669d3cb 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -2270,7 +2270,7 @@ void SyncRes::getBestNSFromCache(const DNSName& qname, const QType qtype, vector vector selected; selected.reserve(s_maxnsperresolve); std::sample(nsVector.cbegin(), nsVector.cend(), std::back_inserter(selected), s_maxnsperresolve, pdns::dns_random_engine()); - nsVector = selected; + nsVector = std::move(selected); } bestns.reserve(nsVector.size());