summaryrefslogtreecommitdiff
path: root/node/OutboundMulticast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/OutboundMulticast.hpp')
-rw-r--r--node/OutboundMulticast.hpp10
1 files changed, 4 insertions, 6 deletions
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<Address>::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: