From 822c865ffeacc8ea0f242395a3a290f3d94472f9 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 26 Nov 2015 20:17:50 +0100 Subject: [PATCH] prevent a storm of string copies just for getting the minTTL of a packet --- pdns/dnspacket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index 1c330446ae..8c693323e3 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -252,7 +252,7 @@ bool DNSPacket::couldBeCached() unsigned int DNSPacket::getMinTTL() { unsigned int minttl = UINT_MAX; - BOOST_FOREACH(DNSResourceRecord rr, d_rrs) { + for(const DNSResourceRecord& rr : d_rrs) { if (rr.ttl < minttl) minttl = rr.ttl; } -- 2.47.2