fix shadowed variable warning

This commit is contained in:
Arvid Norberg 2011-04-08 04:47:26 +00:00
parent 78ef442997
commit 61ceaba6de
1 changed files with 6 additions and 6 deletions

View File

@ -189,7 +189,7 @@ node_impl::node_impl(libtorrent::alert_manager& alerts
, m_send(f) , m_send(f)
, m_userdata(userdata) , m_userdata(userdata)
{ {
m_secret[0] = std::rand(); m_secret[0] = random();
m_secret[1] = std::rand(); m_secret[1] = std::rand();
} }
@ -888,12 +888,12 @@ void node_impl::incoming_request(msg const& m, entry& e)
v.name = name; v.name = name;
} }
peer_entry e; peer_entry peer;
e.addr = tcp::endpoint(m.addr.address(), port); peer.addr = tcp::endpoint(m.addr.address(), port);
e.added = time_now(); peer.added = time_now();
std::set<peer_entry>::iterator i = v.peers.find(e); std::set<peer_entry>::iterator i = v.peers.find(peer);
if (i != v.peers.end()) v.peers.erase(i++); if (i != v.peers.end()) v.peers.erase(i++);
v.peers.insert(i, e); v.peers.insert(i, peer);
#ifdef TORRENT_DHT_VERBOSE_LOGGING #ifdef TORRENT_DHT_VERBOSE_LOGGING
extern int g_announces; extern int g_announces;
++g_announces; ++g_announces;