From bd1f0726ceebb5812ec4c1fa0ce41b651b4e17f2 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 12 Oct 2010 09:01:51 +0000 Subject: [PATCH] fix const issue --- src/torrent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 6461899ae..09270dd98 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -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();