docs and cleanup

This commit is contained in:
Adam Ierymenko 2014-11-26 13:14:18 -08:00
parent 0f505411cf
commit cda61fe2d9
4 changed files with 21 additions and 57 deletions

View file

@ -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: