From: Chris Hofstaedtler Date: Mon, 8 Feb 2021 12:33:58 +0000 (+0100) Subject: AuthDomainCache: use std::move X-Git-Tag: auth-4.5.0-alpha1~7^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dc69000e61e189c582779314c02d18093f3758c;p=thirdparty%2Fpdns.git AuthDomainCache: use std::move --- diff --git a/pdns/auth-domaincache.cc b/pdns/auth-domaincache.cc index d530272727..65b9839a9d 100644 --- a/pdns/auth-domaincache.cc +++ b/pdns/auth-domaincache.cc @@ -108,7 +108,7 @@ void AuthDomainCache::replace(const vector> &domain_indices) { auto& mc = d_maps[mapIndex]; WriteLock l(mc.d_mut); - mc.d_map = newMaps[mapIndex].d_map; + mc.d_map = std::move(newMaps[mapIndex].d_map); } d_statnumentries->store(count); diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index ab57415aed..6346f6f730 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -291,8 +291,8 @@ void UeberBackend::updateDomainCache() { { vector domains; (*i)->getAllDomains(&domains, false); - for(const auto& di: domains) { - domain_indices.push_back({di.zone, (int)di.id}); // this cast should not be necessary + for(auto& di: domains) { + domain_indices.push_back({std::move(di.zone), (int)di.id}); // this cast should not be necessary } } g_domainCache.replace(domain_indices);