some more steps in the direction of getting it to build on vc7
This commit is contained in:
parent
c64393cb0e
commit
2d70a9b5bf
|
@ -230,7 +230,8 @@ char const* peer_index(libtorrent::address addr, std::vector<libtorrent::peer_in
|
||||||
{
|
{
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
std::vector<peer_info>::const_iterator i = std::find_if(peers.begin()
|
std::vector<peer_info>::const_iterator i = std::find_if(peers.begin()
|
||||||
, peers.end(), bind(std::equal_to<address>(), bind(&peer_info::ip, _1), addr));
|
, peers.end(), boost::bind(std::equal_to<address>()
|
||||||
|
, bind(&peer_info::ip, _1), addr));
|
||||||
if (i == peers.end()) return "+";
|
if (i == peers.end()) return "+";
|
||||||
|
|
||||||
static char str[] = " ";
|
static char str[] = " ";
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ namespace libtorrent
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
assert(std::find_if(m_peers.begin(), m_peers.end()
|
assert(std::find_if(m_peers.begin(), m_peers.end()
|
||||||
, bind<bool>(std::equal_to<peer_connection*>(), bind(&peer::connection, _1)
|
, boost::bind<bool>(std::equal_to<peer_connection*>(), bind(&peer::connection, _1)
|
||||||
, &c)) != m_peers.end());
|
, &c)) != m_peers.end());
|
||||||
|
|
||||||
// if the peer is choked and we have upload slots left,
|
// if the peer is choked and we have upload slots left,
|
||||||
|
|
|
@ -484,7 +484,8 @@ namespace libtorrent
|
||||||
// if we don't have the metadata yet, we
|
// if we don't have the metadata yet, we
|
||||||
// cannot tell how big the torrent is.
|
// cannot tell how big the torrent is.
|
||||||
if (!valid_metadata()) return -1;
|
if (!valid_metadata()) return -1;
|
||||||
return m_torrent_file.total_size() - get<0>(bytes_done());
|
return m_torrent_file.total_size()
|
||||||
|
- boost::tuples::get<0>(bytes_done());
|
||||||
}
|
}
|
||||||
|
|
||||||
// the first value is the total number of bytes downloaded
|
// the first value is the total number of bytes downloaded
|
||||||
|
@ -1379,8 +1380,10 @@ namespace libtorrent
|
||||||
|
|
||||||
|
|
||||||
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(),
|
||||||
bind<bool>(std::logical_not<bool>(), boost::bind(&peer_connection::is_connecting,
|
boost::bind<bool>(std::logical_not<bool>(), boost::bind(
|
||||||
boost::bind(&std::map<address,peer_connection*>::value_type::second, _1))));
|
&peer_connection::is_connecting
|
||||||
|
, boost::bind(&std::map<address
|
||||||
|
, 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;
|
||||||
|
|
|
@ -361,7 +361,7 @@ namespace libtorrent
|
||||||
m_urls.push_back(e);
|
m_urls.push_back(e);
|
||||||
|
|
||||||
using boost::bind;
|
using boost::bind;
|
||||||
std::sort(m_urls.begin(), m_urls.end(), bind<bool>(std::less<int>()
|
std::sort(m_urls.begin(), m_urls.end(), boost::bind<bool>(std::less<int>()
|
||||||
, bind(&announce_entry::tier, _1), bind(&announce_entry::tier, _2)));
|
, bind(&announce_entry::tier, _1), bind(&announce_entry::tier, _2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue