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:
stickz
2025-01-12 14:16:20 -05:00
parent 2b73c92a3e
commit 712e7e5db0
16 changed files with 21 additions and 536 deletions
+2 -5
View File
@@ -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(),