From afbce538e0432204d5f47c9d8f3788cefc4256a1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 24 Oct 2024 15:49:29 +0200 Subject: [PATCH] clang-tidy tweaks --- pdns/recursordist/recursor_cache.cc | 2 +- pdns/recursordist/recursor_cache.hh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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; -- 2.47.2