mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 23:22:31 +00:00
cleanup: Remove rak mem_fun
This commit removes rak:mem_fun and replaces it with std::function and lambdas.
This commit is contained in:
+3
-3
@@ -104,9 +104,9 @@ Control::~Control() {
|
||||
void
|
||||
Control::initialize() {
|
||||
display::Canvas::initialize();
|
||||
display::Window::slot_schedule(rak::make_mem_fun(m_display, &display::Manager::schedule));
|
||||
display::Window::slot_unschedule(rak::make_mem_fun(m_display, &display::Manager::unschedule));
|
||||
display::Window::slot_adjust(rak::make_mem_fun(m_display, &display::Manager::adjust_layout));
|
||||
display::Window::slot_schedule([this](display::Window* w, rak::timer t) { m_display->schedule(w, t); });
|
||||
display::Window::slot_unschedule([this](display::Window* w) { m_display->unschedule(w); });
|
||||
display::Window::slot_adjust([this]() { m_display->adjust_layout(); });
|
||||
|
||||
m_core->http_stack()->set_user_agent(USER_AGENT);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define RTORRENT_WINDOW_BASE_H
|
||||
|
||||
#include <rak/timer.h>
|
||||
#include <rak/functional.h>
|
||||
#include <functional>
|
||||
|
||||
#include "canvas.h"
|
||||
#include "globals.h"
|
||||
@@ -46,15 +46,14 @@
|
||||
namespace display {
|
||||
|
||||
class Canvas;
|
||||
class Manager;
|
||||
|
||||
class Window {
|
||||
public:
|
||||
typedef uint32_t extent_type;
|
||||
|
||||
typedef rak::mem_fun0<Manager, void> Slot;
|
||||
typedef rak::mem_fun1<Manager, void, Window*> SlotWindow;
|
||||
typedef rak::mem_fun2<Manager, void, Window*, rak::timer> SlotTimer;
|
||||
typedef std::function<void()> Slot;
|
||||
typedef std::function<void(Window*)> SlotWindow;
|
||||
typedef std::function<void(Window*, rak::timer)> SlotTimer;
|
||||
|
||||
static const int flag_active = (1 << 0);
|
||||
static const int flag_offscreen = (1 << 1);
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <rak/functional.h>
|
||||
|
||||
#include <torrent/exceptions.h>
|
||||
#include <torrent/rate.h>
|
||||
#include <torrent/hash_string.h>
|
||||
|
||||
Reference in New Issue
Block a user