minor cleanup
This commit is contained in:
parent
08965f331c
commit
4f339272dc
|
@ -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,10 +2671,10 @@ 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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrent::tracker_request_timed_out(
|
void torrent::tracker_request_timed_out(
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue