diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-26 13:14:18 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-26 13:14:18 -0800 |
| commit | cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe (patch) | |
| tree | c1d57fd8d1a3cbb8c1e041b9f1c30994835e909f /node/OutboundMulticast.hpp | |
| parent | 0f505411cf40ea0de4c7712003d568d5b8ef882a (diff) | |
| download | infinitytier-cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe.tar.gz infinitytier-cda61fe2d97bb9b415a3108040b06b6c8c6c0bfe.zip | |
docs and cleanup
Diffstat (limited to 'node/OutboundMulticast.hpp')
| -rw-r--r-- | node/OutboundMulticast.hpp | 10 |
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: |
