From: Thomas Jarosch Date: Wed, 11 Feb 2015 16:47:08 +0000 (+0100) Subject: Use const reference for smart_ptr in BOOST_FOREACH X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=1ea5fa634dd6e4d51f9838df616082a9d7919068;p=pingcheck Use const reference for smart_ptr in BOOST_FOREACH --- 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(); }