mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 15:12:30 +00:00
Fixed compiler issues with gcc-4.6 c++0x.
This commit is contained in:
@@ -82,7 +82,7 @@ CurlGet::start() {
|
||||
|
||||
// Normally libcurl should handle the timeout. But sometimes that doesn't
|
||||
// work right so we do a fallback timeout that just aborts the transfer.
|
||||
m_taskTimeout.set_slot(rak::mem_fn(this, &CurlGet::receive_timeout));
|
||||
m_taskTimeout.set_slot(std::tr1::bind(&CurlGet::receive_timeout, this));
|
||||
priority_queue_erase(&taskScheduler, &m_taskTimeout);
|
||||
priority_queue_insert(&taskScheduler, &m_taskTimeout, cachedTime + rak::timer::from_seconds(m_timeout + 5));
|
||||
}
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
#include "curl_socket.h"
|
||||
#include "curl_stack.h"
|
||||
|
||||
namespace std { using namespace tr1; }
|
||||
|
||||
namespace core {
|
||||
|
||||
CurlStack::CurlStack() :
|
||||
@@ -57,7 +55,7 @@ CurlStack::CurlStack() :
|
||||
m_ssl_verify_peer(true),
|
||||
m_dns_timeout(60) {
|
||||
|
||||
m_taskTimeout.set_slot(rak::mem_fn(this, &CurlStack::receive_timeout));
|
||||
m_taskTimeout.set_slot(std::tr1::bind(&CurlStack::receive_timeout, this));
|
||||
|
||||
#if (LIBCURL_VERSION_NUM >= 0x071000)
|
||||
curl_multi_setopt((CURLM*)m_handle, CURLMOPT_TIMERDATA, this);
|
||||
|
||||
@@ -114,7 +114,7 @@ DhtManager::start_dht() {
|
||||
torrent::dht_manager()->start(port);
|
||||
torrent::dht_manager()->reset_statistics();
|
||||
|
||||
m_updateTimeout.set_slot(rak::mem_fn(this, &DhtManager::update));
|
||||
m_updateTimeout.set_slot(std::tr1::bind(&DhtManager::update, this));
|
||||
priority_queue_insert(&taskScheduler, &m_updateTimeout, (cachedTime + rak::timer::from_seconds(60)).round_seconds());
|
||||
|
||||
m_dhtPrevCycle = 0;
|
||||
@@ -197,7 +197,7 @@ DhtManager::update() {
|
||||
break;
|
||||
|
||||
if (itr == end) {
|
||||
m_stopTimeout.set_slot(rak::mem_fn(this, &DhtManager::stop_dht));
|
||||
m_stopTimeout.set_slot(std::tr1::bind(&DhtManager::stop_dht, this));
|
||||
priority_queue_insert(&taskScheduler, &m_stopTimeout, (cachedTime + rak::timer::from_seconds(15 * 60)).round_seconds());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <rak/path.h>
|
||||
#include <tr1/functional>
|
||||
#include <torrent/utils/resume.h>
|
||||
#include <torrent/object.h>
|
||||
#include <torrent/object_stream.h>
|
||||
@@ -105,8 +106,8 @@ DownloadFactory::DownloadFactory(Manager* m) :
|
||||
m_printLog(true),
|
||||
m_isFile(false) {
|
||||
|
||||
m_taskLoad.set_slot(rak::mem_fn(this, &DownloadFactory::receive_load));
|
||||
m_taskCommit.set_slot(rak::mem_fn(this, &DownloadFactory::receive_commit));
|
||||
m_taskLoad.set_slot(std::tr1::bind(&DownloadFactory::receive_load, this));
|
||||
m_taskCommit.set_slot(std::tr1::bind(&DownloadFactory::receive_commit, this));
|
||||
|
||||
// m_variables["connection_leech"] = rpc::call_command_void("protocol.connection.leech");
|
||||
// m_variables["connection_seed"] = rpc::call_command_void("protocol.connection.seed");
|
||||
@@ -156,8 +157,8 @@ DownloadFactory::receive_load() {
|
||||
m_stream = new std::stringstream;
|
||||
HttpQueue::iterator itr = m_manager->http_queue()->insert(m_uri, m_stream);
|
||||
|
||||
(*itr)->signal_done().push_front(std::bind(&DownloadFactory::receive_loaded, this));
|
||||
(*itr)->signal_failed().push_front(std::bind(&DownloadFactory::receive_failed, this, std::placeholders::_1));
|
||||
(*itr)->signal_done().push_front(std::tr1::bind(&DownloadFactory::receive_loaded, this));
|
||||
(*itr)->signal_failed().push_front(std::tr1::bind(&DownloadFactory::receive_failed, this, std::tr1::placeholders::_1));
|
||||
|
||||
m_variables["tied_to_file"] = (int64_t)false;
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ DownloadList::insert(Download* download) {
|
||||
iterator itr = base_type::insert(end(), download);
|
||||
|
||||
try {
|
||||
(*itr)->data()->slot_initial_hash() = std::bind(&DownloadList::hash_done, this, download);
|
||||
(*itr)->data()->slot_download_done() = std::bind(&DownloadList::received_finished, this, download);
|
||||
(*itr)->data()->slot_initial_hash() = tr1::bind(&DownloadList::hash_done, this, download);
|
||||
(*itr)->data()->slot_download_done() = tr1::bind(&DownloadList::received_finished, this, download);
|
||||
|
||||
// This needs to be separated into two different calls to ensure
|
||||
// the download remains in the view.
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
#include "http_queue.h"
|
||||
#include "curl_get.h"
|
||||
|
||||
namespace std { using namespace tr1; }
|
||||
|
||||
namespace core {
|
||||
|
||||
HttpQueue::iterator
|
||||
@@ -60,8 +58,8 @@ HttpQueue::insert(const std::string& url, std::iostream* s) {
|
||||
|
||||
iterator itr = Base::insert(end(), h.get());
|
||||
|
||||
h->signal_done().push_back(std::bind(&HttpQueue::erase, this, itr));
|
||||
h->signal_failed().push_back(std::bind(&HttpQueue::erase, this, itr));
|
||||
h->signal_done().push_back(std::tr1::bind(&HttpQueue::erase, this, itr));
|
||||
h->signal_failed().push_back(std::tr1::bind(&HttpQueue::erase, this, itr));
|
||||
|
||||
(*itr)->start();
|
||||
|
||||
|
||||
+1
-3
@@ -76,8 +76,6 @@
|
||||
#include "poll_manager_select.h"
|
||||
#include "view.h"
|
||||
|
||||
namespace std { using namespace tr1; }
|
||||
|
||||
namespace core {
|
||||
|
||||
void
|
||||
@@ -206,7 +204,7 @@ Manager::get_address_throttle(const sockaddr* addr) {
|
||||
// Most of this should be possible to move out.
|
||||
void
|
||||
Manager::initialize_second() {
|
||||
torrent::Http::set_factory(std::bind(&CurlStack::new_object, m_httpStack));
|
||||
torrent::Http::set_factory(tr1::bind(&CurlStack::new_object, m_httpStack));
|
||||
m_httpQueue->slot_factory(sigc::mem_fun(m_httpStack, &CurlStack::new_object));
|
||||
|
||||
CurlStack::global_init();
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ View::initialize(const std::string& name) {
|
||||
m_focus = 0;
|
||||
|
||||
set_last_changed(rak::timer());
|
||||
m_delayChanged.set_slot(rak::mem_fn(&m_signalChanged, &signal_type::operator()));
|
||||
m_delayChanged.set_slot(std::tr1::bind(&signal_type::operator(), &m_signalChanged));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#ifndef RTORRENT_CORE_VIEW_DOWNLOADS_H
|
||||
#define RTORRENT_CORE_VIEW_DOWNLOADS_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <rak/timer.h>
|
||||
|
||||
Reference in New Issue
Block a user