fix const issue

This commit is contained in:
Arvid Norberg 2010-10-12 09:01:51 +00:00
parent 7bd25edc9d
commit bd1f0726ce
1 changed files with 2 additions and 2 deletions

View File

@ -5241,7 +5241,7 @@ namespace libtorrent
int torrent::get_peer_upload_limit(tcp::endpoint ip) const
{
TORRENT_ASSERT(m_ses.is_network_thread());
peer_iterator i = std::find_if(m_connections.begin(), m_connections.end()
const_peer_iterator i = std::find_if(m_connections.begin(), m_connections.end()
, boost::bind(&peer_connection::remote, _1) == ip);
if (i == m_connections.end()) return -1;
return (*i)->get_upload_limit();
@ -5250,7 +5250,7 @@ namespace libtorrent
int torrent::get_peer_download_limit(tcp::endpoint ip) const
{
TORRENT_ASSERT(m_ses.is_network_thread());
peer_iterator i = std::find_if(m_connections.begin(), m_connections.end()
const_peer_iterator i = std::find_if(m_connections.begin(), m_connections.end()
, boost::bind(&peer_connection::remote, _1) == ip);
if (i == m_connections.end()) return -1;
return (*i)->get_download_limit();