minor cleanup

This commit is contained in:
Arvid Norberg 2007-06-03 05:57:05 +00:00
parent 08965f331c
commit 4f339272dc
2 changed files with 7 additions and 7 deletions

View File

@ -2549,8 +2549,8 @@ namespace libtorrent
torrent_status st; torrent_status st;
st.num_peers = (int)std::count_if(m_connections.begin(), m_connections.end(), st.num_peers = (int)std::count_if(m_connections.begin(), m_connections.end(),
boost::bind<bool>(std::logical_not<bool>(), boost::bind(&peer_connection::is_connecting, !boost::bind(&peer_connection::is_connecting
boost::bind(&std::map<tcp::endpoint,peer_connection*>::value_type::second, _1)))); , boost::bind(&std::map<tcp::endpoint,peer_connection*>::value_type::second, _1)));
st.num_complete = m_complete; st.num_complete = m_complete;
st.num_incomplete = m_incomplete; st.num_incomplete = m_incomplete;
@ -2671,9 +2671,9 @@ namespace libtorrent
{ {
INVARIANT_CHECK; INVARIANT_CHECK;
return (int)std::count_if(m_connections.begin(), m_connections.end(), return (int)std::count_if(m_connections.begin(), m_connections.end()
boost::bind(&peer_connection::is_seed, , boost::bind(&peer_connection::is_seed
boost::bind(&std::map<tcp::endpoint , boost::bind(&std::map<tcp::endpoint
, peer_connection*>::value_type::second, _1))); , peer_connection*>::value_type::second, _1)));
} }

View File

@ -727,7 +727,7 @@ namespace libtorrent
{ {
peer_connection* peer = i->second; peer_connection* peer = i->second;
// peers that haven't finished the handshake should // incoming peers that haven't finished the handshake should
// not be included in this list // not be included in this list
if (peer->associated_torrent().expired()) continue; if (peer->associated_torrent().expired()) continue;