mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 06:02:31 +00:00
cleanup: Remove rak/functional.h
This commit replaces the `rak/functional.h` features with lambdas and std functions. There was one instance with `std::sort` where the comparison operator was always evaluating to false and it wasn't sorting anything. This is removed in favour of the default comparison operator. `std::sort(transferChunks.begin(), transferChunks.end());`
This commit is contained in:
@@ -36,8 +36,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <rak/functional.h>
|
||||
|
||||
#include <torrent/exceptions.h>
|
||||
#include <torrent/rate.h>
|
||||
#include <torrent/hash_string.h>
|
||||
@@ -63,11 +61,10 @@ ElementPeerList::ElementPeerList(core::Download* d) :
|
||||
|
||||
m_listItr = m_list.end();
|
||||
|
||||
std::for_each(m_download->download()->connection_list()->begin(), m_download->download()->connection_list()->end(),
|
||||
rak::bind1st(std::mem_fun<void,PList,PList::const_reference>(&PList::push_back), &m_list));
|
||||
|
||||
torrent::ConnectionList* connection_list = m_download->download()->connection_list();
|
||||
|
||||
std::for_each(connection_list->begin(), connection_list->end(), [&](torrent::Peer* peer) { m_list.push_back(peer); });
|
||||
|
||||
m_peer_connected = connection_list->signal_connected().insert(connection_list->signal_connected().end(),
|
||||
std::bind(&ElementPeerList::receive_peer_connected, this, std::placeholders::_1));
|
||||
m_peer_disconnected = connection_list->signal_disconnected().insert(connection_list->signal_disconnected().end(),
|
||||
|
||||
Reference in New Issue
Block a user