Cleanup code identified in code review

This commit is contained in:
Nik Bougalis
2016-11-15 22:22:09 -08:00
parent db95808206
commit 44167a6bcb
3 changed files with 5 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ HashRouter::shouldRelay (uint256 const& key)
if (!s.shouldRelay(suppressionMap_.clock().now(), holdTime_))
return boost::none;
return std::move(s.peekPeers());
return s.releasePeerSet();
}
} // ripple

View File

@@ -86,9 +86,10 @@ private:
flags_ |= flagsToSet;
}
std::set <PeerShortID>& peekPeers()
/** Return set of peers we've relayed to and reset tracking */
std::set<PeerShortID> releasePeerSet()
{
return peers_;
return std::move(peers_);
}
/** Determines if this item should be relayed.