From cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 26 Nov 2014 13:14:18 -0800 Subject: docs and cleanup --- node/OutboundMulticast.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'node/OutboundMulticast.hpp') diff --git a/node/OutboundMulticast.hpp b/node/OutboundMulticast.hpp index b3ca36a5..77e99377 100644 --- a/node/OutboundMulticast.hpp +++ b/node/OutboundMulticast.hpp @@ -133,12 +133,10 @@ public: */ inline bool sendIfNew(const RuntimeEnvironment *RR,const Address &toAddr) { - for(std::vector
::const_iterator a(_alreadySentTo.begin());a!=_alreadySentTo.end();++a) { - if (*a == toAddr) - return false; - } - sendAndLog(RR,toAddr); - return true; + if (std::find(_alreadySentTo.begin(),_alreadySentTo.end(),toAddr) == _alreadySentTo.end()) { + sendAndLog(RR,toAddr); + return true; + } else return false; } private: -- cgit v1.2.3