attempted heap optimization in DHT routing table

This commit is contained in:
Arvid Norberg 2007-05-10 05:48:14 +00:00
parent 9ead2e2f54
commit a531027e3f
1 changed files with 1 additions and 0 deletions

View File

@ -313,6 +313,7 @@ bool routing_table::node_seen(node_id const& id, udp::endpoint addr)
if (i != rb.end()) return ret;
if ((int)rb.size() > m_bucket_size) rb.erase(rb.begin());
if (rb.empty()) rm.reserve(m_bucket_size);
rb.push_back(node_entry(id, addr));
// TORRENT_LOG(table) << "inserting node in replacement cache: " << id << " " << addr;
return ret;