From e1948fa203cf5a446e005e8a305d04213acd4802 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 4 Oct 2010 03:26:42 +0000 Subject: [PATCH] make the invariant check less expensive --- src/peer_connection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index d49aa0505..707f90e84 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -5091,7 +5091,7 @@ namespace libtorrent int num_peers_with_timeouts; int num_peers_with_nowant; int num_not_requested; - std::vector peers; +// std::vector peers; }; void peer_connection::check_invariant() const @@ -5230,7 +5230,7 @@ namespace libtorrent ++num_requests[i->block].num_peers_with_timeouts; ++num_requests[i->block].num_peers_with_nowant; ++num_requests[i->block].num_not_requested; - num_requests[i->block].peers.push_back(&p); +// num_requests[i->block].peers.push_back(&p); } for (std::vector::const_iterator i = p.download_queue().begin() , end(p.download_queue().end()); i != end; ++i) @@ -5238,7 +5238,7 @@ namespace libtorrent if (!i->not_wanted && !i->timed_out) ++num_requests[i->block].num_peers; if (i->timed_out) ++num_requests[i->block].num_peers_with_timeouts; if (i->not_wanted) ++num_requests[i->block].num_peers_with_nowant; - num_requests[i->block].peers.push_back(&p); +// num_requests[i->block].peers.push_back(&p); } } for (std::map::iterator i = num_requests.begin()