From: Otto Moerbeek Date: Thu, 24 Oct 2024 13:49:29 +0000 (+0200) Subject: clang-tidy tweaks X-Git-Tag: rec-5.2.0-alpha1~12^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afbce538e0432204d5f47c9d8f3788cefc4256a1;p=thirdparty%2Fpdns.git clang-tidy tweaks --- diff --git a/pdns/recursordist/recursor_cache.cc b/pdns/recursordist/recursor_cache.cc index 0c240e71ed..9bfdb010fd 100644 --- a/pdns/recursordist/recursor_cache.cc +++ b/pdns/recursordist/recursor_cache.cc @@ -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; } diff --git a/pdns/recursordist/recursor_cache.hh b/pdns/recursordist/recursor_cache.hh index 50c637afdf..596eeb85ad 100644 --- a/pdns/recursordist/recursor_cache.hh +++ b/pdns/recursordist/recursor_cache.hh @@ -21,7 +21,6 @@ */ #pragma once #include -#include #include "dns.hh" #include "qtype.hh" #include "misc.hh" @@ -63,7 +62,7 @@ public: [[nodiscard]] pair 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;