mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 23:52:30 +00:00
C++11 compatibility fixes.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <tr1/functional>
|
||||
#include lt_tr1_functional
|
||||
#include <rak/algorithm.h>
|
||||
#include <torrent/exceptions.h>
|
||||
|
||||
@@ -367,9 +367,9 @@ Frame::balance_row(uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
|
||||
//
|
||||
// Else if we're short, only give each what they require.
|
||||
std::stable_sort(dynamicFrames, dynamicFrames + dynamicSize,
|
||||
std::tr1::bind(std::greater<extent_type>(),
|
||||
std::tr1::bind(&dynamic_min_height, std::tr1::placeholders::_1),
|
||||
std::tr1::bind(&dynamic_min_height, std::tr1::placeholders::_2)));
|
||||
std::bind(std::greater<extent_type>(),
|
||||
std::bind(&dynamic_min_height, std::placeholders::_1),
|
||||
std::bind(&dynamic_min_height, std::placeholders::_2)));
|
||||
|
||||
bool retry;
|
||||
|
||||
@@ -442,9 +442,9 @@ Frame::balance_column(uint32_t x, uint32_t y, uint32_t width, uint32_t height) {
|
||||
//
|
||||
// Else if we're short, only give each what they require.
|
||||
std::stable_sort(dynamicFrames, dynamicFrames + dynamicSize,
|
||||
std::tr1::bind(std::greater<extent_type>(),
|
||||
std::tr1::bind(&dynamic_min_width, std::tr1::placeholders::_1),
|
||||
std::tr1::bind(&dynamic_min_width, std::tr1::placeholders::_2)));
|
||||
std::bind(std::greater<extent_type>(),
|
||||
std::bind(&dynamic_min_width, std::placeholders::_1),
|
||||
std::bind(&dynamic_min_width, std::placeholders::_2)));
|
||||
|
||||
bool retry;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace display {
|
||||
Manager::Manager() :
|
||||
m_forceRedraw(false) {
|
||||
|
||||
m_taskUpdate.slot() = std::tr1::bind(&Manager::receive_update, this);
|
||||
m_taskUpdate.slot() = std::bind(&Manager::receive_update, this);
|
||||
}
|
||||
|
||||
Manager::~Manager() {
|
||||
|
||||
@@ -59,7 +59,7 @@ Window::Window(Canvas* canvas, int flags, extent_type minWidth, extent_type minH
|
||||
m_maxWidth(maxWidth),
|
||||
m_maxHeight(maxHeight) {
|
||||
|
||||
m_taskUpdate.slot() = std::tr1::bind(&Window::redraw, this);
|
||||
m_taskUpdate.slot() = std::bind(&Window::redraw, this);
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
|
||||
@@ -68,7 +68,7 @@ WindowDownloadList::set_view(core::View* l) {
|
||||
m_view = l;
|
||||
|
||||
if (m_view != NULL)
|
||||
m_changed_itr = m_view->signal_changed().insert(m_view->signal_changed().begin(), std::tr1::bind(&Window::mark_dirty, this));
|
||||
m_changed_itr = m_view->signal_changed().insert(m_view->signal_changed().begin(), std::bind(&Window::mark_dirty, this));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <locale>
|
||||
#include <stdio.h>
|
||||
#include <torrent/path.h>
|
||||
#include <torrent/data/file.h>
|
||||
|
||||
@@ -53,13 +53,13 @@ WindowHttpQueue::WindowHttpQueue(core::HttpQueue* q) :
|
||||
|
||||
set_active(false);
|
||||
m_connInsert = m_queue->signal_insert().insert(m_queue->signal_insert().end(),
|
||||
std::tr1::bind(&WindowHttpQueue::receive_insert,
|
||||
std::bind(&WindowHttpQueue::receive_insert,
|
||||
this,
|
||||
std::tr1::placeholders::_1));
|
||||
std::placeholders::_1));
|
||||
m_connErase = m_queue->signal_erase().insert(m_queue->signal_insert().end(),
|
||||
std::tr1::bind(&WindowHttpQueue::receive_erase,
|
||||
std::bind(&WindowHttpQueue::receive_erase,
|
||||
this,
|
||||
std::tr1::placeholders::_1));
|
||||
std::placeholders::_1));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifndef RTORRENT_DISPLAY_WINDOW_HTTP_QUEUE_H
|
||||
#define RTORRENT_DISPLAY_WINDOW_HTTP_QUEUE_H
|
||||
|
||||
#include <tr1/functional>
|
||||
#include lt_tr1_functional
|
||||
|
||||
#include "window.h"
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace display {
|
||||
|
||||
class WindowHttpQueue : public Window {
|
||||
public:
|
||||
typedef std::tr1::function<void (core::CurlGet*)> slot_curl_get;
|
||||
typedef std::function<void (core::CurlGet*)> slot_curl_get;
|
||||
typedef std::list<slot_curl_get> signal_curl_get;
|
||||
|
||||
WindowHttpQueue(core::HttpQueue* q);
|
||||
|
||||
@@ -50,11 +50,11 @@ WindowLog::WindowLog(torrent::log_buffer* l) :
|
||||
Window(new Canvas, 0, 0, 0, extent_full, extent_static),
|
||||
m_log(l) {
|
||||
|
||||
m_taskUpdate.slot() = std::tr1::bind(&WindowLog::receive_update, this);
|
||||
m_taskUpdate.slot() = std::bind(&WindowLog::receive_update, this);
|
||||
|
||||
unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(std::tr1::bind(&WindowLog::receive_update, this));
|
||||
unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(std::bind(&WindowLog::receive_update, this));
|
||||
|
||||
m_log->lock_and_set_update_slot(std::tr1::bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false));
|
||||
m_log->lock_and_set_update_slot(std::bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false));
|
||||
}
|
||||
|
||||
WindowLog::~WindowLog() {
|
||||
|
||||
Reference in New Issue
Block a user