]> granicus.if.org Git - pdns/commitdiff
prevent a storm of string copies just for getting the minTTL of a packet
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Nov 2015 19:17:50 +0000 (20:17 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Nov 2015 19:17:50 +0000 (20:17 +0100)
pdns/dnspacket.cc

index 1c330446ae4c58c90d42c656db914c766cadce4e..8c693323e3a79b3f6de9985a4db5b282762789bd 100644 (file)
@@ -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;
   }