vs2010 build fixes

This commit is contained in:
Arvid Norberg
2010-07-22 16:49:40 +00:00
parent 72060e8676
commit 67110ec0a3
3 changed files with 19 additions and 19 deletions

View File

@@ -1647,7 +1647,7 @@ namespace aux {
shared_ptr<socket_type> c(new socket_type(m_io_service));
c->instantiate<stream_socket>(m_io_service);
listener->async_accept(*c->get<stream_socket>()
, bind(&session_impl::on_accept_connection, this, c
, boost::bind(&session_impl::on_accept_connection, this, c
, boost::weak_ptr<socket_acceptor>(listener), _1));
}
@@ -1878,10 +1878,10 @@ namespace aux {
if (!p->is_choked() && !p->ignore_unchoke_slots()) --m_num_unchoked;
// connection_map::iterator i = std::lower_bound(m_connections.begin(), m_connections.end()
// , p, bind(&boost::intrusive_ptr<peer_connection>::get, _1) < p);
// , p, boost::bind(&boost::intrusive_ptr<peer_connection>::get, _1) < p);
// if (i->get() != p) i == m_connections.end();
connection_map::iterator i = std::find_if(m_connections.begin(), m_connections.end()
, bind(&boost::intrusive_ptr<peer_connection>::get, _1) == p);
, boost::bind(&boost::intrusive_ptr<peer_connection>::get, _1) == p);
if (i != m_connections.end()) m_connections.erase(i);
}
@@ -2618,11 +2618,11 @@ namespace aux {
if (!handled_by_extension)
{
std::sort(downloaders.begin(), downloaders.end()
, bind(&torrent::sequence_number, _1) < bind(&torrent::sequence_number, _2));
, boost::bind(&torrent::sequence_number, _1) < boost::bind(&torrent::sequence_number, _2));
std::sort(seeds.begin(), seeds.end()
, bind(&torrent::seed_rank, _1, boost::ref(m_settings))
> bind(&torrent::seed_rank, _2, boost::ref(m_settings)));
, boost::bind(&torrent::seed_rank, _1, boost::ref(m_settings))
> boost::bind(&torrent::seed_rank, _2, boost::ref(m_settings)));
}
if (settings().auto_manage_prefer_seeds)
@@ -2791,7 +2791,7 @@ namespace aux {
{
m_allowed_upload_slots = 0;
std::sort(peers.begin(), peers.end()
, bind(&peer_connection::upload_rate_compare, _1, _2));
, boost::bind(&peer_connection::upload_rate_compare, _1, _2));
#ifdef TORRENT_DEBUG
for (std::vector<peer_connection*>::const_iterator i = peers.begin()
@@ -2838,7 +2838,7 @@ namespace aux {
// if we're using the bittyrant choker, sort peers by their return
// on investment. i.e. download rate / upload rate
std::sort(peers.begin(), peers.end()
, bind(&peer_connection::bittyrant_unchoke_compare, _1, _2));
, boost::bind(&peer_connection::bittyrant_unchoke_compare, _1, _2));
}
else
{
@@ -2847,7 +2847,7 @@ namespace aux {
// the download rate will be 0, and the peers we have sent the least to should
// be unchoked
std::sort(peers.begin(), peers.end()
, bind(&peer_connection::unchoke_compare, _1, _2));
, boost::bind(&peer_connection::unchoke_compare, _1, _2));
}
// auto unchoke
@@ -3568,7 +3568,7 @@ namespace aux {
snprintf(port, sizeof(port), "%d", node.second);
tcp::resolver::query q(node.first, port);
m_host_resolver.async_resolve(q,
bind(&session_impl::on_dht_router_name_lookup, this, _1, _2));
boost::bind(&session_impl::on_dht_router_name_lookup, this, _1, _2));
}
void session_impl::on_dht_router_name_lookup(error_code const& e
@@ -3763,7 +3763,7 @@ namespace aux {
m_lsd = new lsd(m_io_service
, m_listen_interface.address()
, bind(&session_impl::on_lsd_peer, this, _1, _2));
, boost::bind(&session_impl::on_lsd_peer, this, _1, _2));
if (m_settings.broadcast_lsd)
m_lsd->use_broadcast(true);
}