From: Otto Moerbeek Date: Fri, 18 Sep 2020 08:04:22 +0000 (+0200) Subject: Apply suggestions from code review X-Git-Tag: rec-4.5.0-alpha0^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad56516492e392256386a3e234401faaae706120;p=thirdparty%2Fpdns.git Apply suggestions from code review Co-authored-by: Remi Gacogne --- diff --git a/pdns/recursordist/negcache.cc b/pdns/recursordist/negcache.cc index 3f4c13a130..a2e5036867 100644 --- a/pdns/recursordist/negcache.cc +++ b/pdns/recursordist/negcache.cc @@ -104,7 +104,7 @@ bool NegCache::get(const DNSName& qname, const QType& qtype, const struct timeva auto& map = getMap(qname); const lock l(map); - const auto& idx = map.d_map.get<2>(); + const auto& idx = map.d_map.get(); auto range = idx.equal_range(qname); auto ni = range.first; @@ -112,7 +112,7 @@ bool NegCache::get(const DNSName& qname, const QType& qtype, const struct timeva // We have an entry if ((!typeMustMatch && ni->d_qtype.getCode() == 0) || ni->d_qtype == qtype) { // We match the QType or the whole name is denied - auto firstIndexIterator = map.d_map.project<0>(ni); + auto firstIndexIterator = map.d_map.project(ni); if (now.tv_sec < ni->d_ttd) { // Not expired