From 1ea5fa634dd6e4d51f9838df616082a9d7919068 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 11 Feb 2015 17:47:08 +0100 Subject: [PATCH] Use const reference for smart_ptr in BOOST_FOREACH --- src/icmp/icmppinger.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 703615b..0665040 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -506,7 +506,7 @@ void IcmpPacketDistributor::handle_receive( { // check which pinger wants this packet bool packet_matches = false; - BOOST_FOREACH( IcmpPingerItem pinger, PingerList ) + BOOST_FOREACH( const IcmpPingerItem &pinger, PingerList ) { packet_matches |= pinger->handle_receive_icmp_packet( icmp_packet, bytes_transferred); @@ -564,7 +564,9 @@ void IcmpPacketDistributor::clean_up_all() { BOOST_FOREACH( IcmpPacketDistributor::map_type::value_type &instance, Instances ) + { instance.second->clean_up(); + } Instances.clear(); } -- 1.7.1