]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
AuthDomainCache: use std::move
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 8 Feb 2021 12:33:58 +0000 (13:33 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sat, 15 May 2021 22:45:45 +0000 (00:45 +0200)
pdns/auth-domaincache.cc
pdns/ueberbackend.cc

index d530272727d35910fbcc2aab29a51ed39b4439bf..65b9839a9d0c6dcdf6043687144823184ef28da5 100644 (file)
@@ -108,7 +108,7 @@ void AuthDomainCache::replace(const vector<tuple<DNSName, int>> &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);
index ab57415aed63a8df155e1cfc450c0dfe2184b344..6346f6f73001c8e1d7204745b3c4a494279a5286 100644 (file)
@@ -291,8 +291,8 @@ void UeberBackend::updateDomainCache() {
   {
     vector<DomainInfo> 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);