mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 04:32:30 +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:
@@ -39,7 +39,6 @@
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <time.h>
|
||||
#include <rak/functional.h>
|
||||
#include <rak/string_manip.h>
|
||||
#include <torrent/exceptions.h>
|
||||
|
||||
@@ -55,7 +54,7 @@ CommandScheduler::~CommandScheduler() {
|
||||
|
||||
CommandScheduler::iterator
|
||||
CommandScheduler::find(const std::string& key) {
|
||||
return std::find_if(begin(), end(), rak::equal(key, std::mem_fun(&CommandSchedulerItem::key)));
|
||||
return std::find_if(begin(), end(), [key](CommandSchedulerItem* item) { return key == item->key(); });
|
||||
}
|
||||
|
||||
CommandScheduler::iterator
|
||||
|
||||
Reference in New Issue
Block a user