Merge #8466: [Trivial] Do not shadow variables in networking code

b7c349d Do not shadow variables in networking code (Pavel Janík)
This commit is contained in:
Wladimir J. van der Laan
2016-09-02 12:32:49 +02:00
5 changed files with 13 additions and 13 deletions

View File

@@ -512,21 +512,21 @@ public:
void AddAddressKnown(const CAddress& addr)
void AddAddressKnown(const CAddress& _addr)
{
addrKnown.insert(addr.GetKey());
addrKnown.insert(_addr.GetKey());
}
void PushAddress(const CAddress& addr)
void PushAddress(const CAddress& _addr)
{
// Known checking here is only to save space from duplicates.
// SendMessages will filter it again for knowns that were added
// after addresses were pushed.
if (addr.IsValid() && !addrKnown.contains(addr.GetKey())) {
if (_addr.IsValid() && !addrKnown.contains(_addr.GetKey())) {
if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) {
vAddrToSend[insecure_rand() % vAddrToSend.size()] = addr;
vAddrToSend[insecure_rand() % vAddrToSend.size()] = _addr;
} else {
vAddrToSend.push_back(addr);
vAddrToSend.push_back(_addr);
}
}
}