summaryrefslogtreecommitdiff
path: root/node/OutboundMulticast.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-11-26 13:14:18 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-11-26 13:14:18 -0800
commitcda61fe2d97bb9b415a3108040b06b6c8c6c0bfe (patch)
treec1d57fd8d1a3cbb8c1e041b9f1c30994835e909f /node/OutboundMulticast.hpp
parent0f505411cf40ea0de4c7712003d568d5b8ef882a (diff)
downloadinfinitytier-cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe.tar.gz
infinitytier-cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe.zip
docs and cleanup
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: