]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
clang-tidy tweaks
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 24 Oct 2024 13:49:29 +0000 (15:49 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 24 Oct 2024 13:51:01 +0000 (15:51 +0200)
pdns/recursordist/recursor_cache.cc
pdns/recursordist/recursor_cache.hh

index 0c240e71ed9acf4684aae4578a8ab5b6f09d2409..9bfdb010fd1037d2ed496b678988550c600ba87b 100644 (file)
@@ -578,7 +578,7 @@ bool MemRecursorCache::replace(CacheEntry&& entry)
 
   lockedShard->d_cachecachevalid = false;
   entry.d_submitted = false;
-  if (lockedShard->d_map.insert(entry).second) {
+  if (lockedShard->d_map.emplace(std::move(entry)).second) {
     shard.incEntriesCount();
     return true;
   }
index 50c637afdf89f7cf0e48a0026b713a2323603620..596eeb85ad70def72720c7e6480bb349bfd076d4 100644 (file)
@@ -21,7 +21,6 @@
  */
 #pragma once
 #include <string>
-#include <set>
 #include "dns.hh"
 #include "qtype.hh"
 #include "misc.hh"
@@ -63,7 +62,7 @@ public:
   [[nodiscard]] pair<uint64_t, uint64_t> stats();
   [[nodiscard]] size_t ecsIndexSize();
 
-  size_t getRecords(size_t howmany, size_t maxsize, std::string& ret);
+  size_t getRecords(size_t perShard, size_t maxSize, std::string& ret);
   size_t putRecords(const std::string& pbuf);
 
   using OptTag = boost::optional<std::string>;