added catch blocks to lsd. changed bind expressions to use operators

This commit is contained in:
Arvid Norberg
2007-04-29 20:49:30 +00:00
parent 9f1a11aa50
commit f41fd7d303
5 changed files with 31 additions and 27 deletions

View File

@@ -244,8 +244,7 @@ int peer_index(libtorrent::tcp::endpoint addr, std::vector<libtorrent::peer_info
{
using namespace libtorrent;
std::vector<peer_info>::const_iterator i = std::find_if(peers.begin()
, peers.end(), boost::bind(std::equal_to<libtorrent::tcp::endpoint>()
, bind(&peer_info::ip, _1), addr));
, peers.end(), bind(&peer_info::ip, _1) == addr);
if (i == peers.end()) return -1;
return i - peers.begin();