mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 06:02:31 +00:00
Fixed compiler issues with gcc-4.6 c++0x.
This commit is contained in:
@@ -5,3 +5,5 @@ scripts/ltoptions.m4
|
||||
scripts/ltsugar.m4
|
||||
scripts/ltversion.m4
|
||||
scripts/lt~obsolete.m4
|
||||
|
||||
test/rtorrentTest
|
||||
|
||||
@@ -11,6 +11,8 @@ TORRENT_CHECK_CXXFLAGS()
|
||||
TORRENT_ENABLE_DEBUG()
|
||||
TORRENT_ENABLE_EXTRA_DEBUG()
|
||||
TORRENT_ENABLE_WERROR()
|
||||
TORRENT_ENABLE_TR1()
|
||||
TORRENT_ENABLE_CXX11()
|
||||
|
||||
TORRENT_DISABLE_IPV6
|
||||
|
||||
|
||||
+10
-10
@@ -96,13 +96,13 @@ public:
|
||||
|
||||
bool is_valid() const { return m_base.get() != NULL; }
|
||||
|
||||
void set(base_type* base) { m_base = std::auto_ptr<base_type>(base); }
|
||||
void set(base_type* base) { m_base = std::shared_ptr<base_type>(base); }
|
||||
base_type* release() { return m_base.release(); }
|
||||
|
||||
Result operator () () { return (*m_base)(); }
|
||||
|
||||
private:
|
||||
std::auto_ptr<base_type> m_base;
|
||||
std::shared_ptr<base_type> m_base;
|
||||
};
|
||||
|
||||
template <typename Result, typename Arg1>
|
||||
@@ -113,13 +113,13 @@ public:
|
||||
|
||||
bool is_valid() const { return m_base.get() != NULL; }
|
||||
|
||||
void set(base_type* base) { m_base = std::auto_ptr<base_type>(base); }
|
||||
void set(base_type* base) { m_base = std::shared_ptr<base_type>(base); }
|
||||
base_type* release() { return m_base.release(); }
|
||||
|
||||
Result operator () (Arg1 arg1) { return (*m_base)(arg1); }
|
||||
|
||||
private:
|
||||
std::auto_ptr<base_type> m_base;
|
||||
std::shared_ptr<base_type> m_base;
|
||||
};
|
||||
|
||||
template <typename Result, typename Arg1, typename Arg2>
|
||||
@@ -130,13 +130,13 @@ public:
|
||||
|
||||
bool is_valid() const { return m_base.get() != NULL; }
|
||||
|
||||
void set(base_type* base) { m_base = std::auto_ptr<base_type>(base); }
|
||||
void set(base_type* base) { m_base = std::shared_ptr<base_type>(base); }
|
||||
base_type* release() { return m_base.release(); }
|
||||
|
||||
Result operator () (Arg1 arg1, Arg2 arg2) { return (*m_base)(arg1, arg2); }
|
||||
|
||||
private:
|
||||
std::auto_ptr<base_type> m_base;
|
||||
std::shared_ptr<base_type> m_base;
|
||||
};
|
||||
|
||||
template <typename Result, typename Arg2>
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
|
||||
bool is_valid() const { return m_base.get() != NULL; }
|
||||
|
||||
void set(base_type* base) { m_base = std::auto_ptr<base_type>(base); }
|
||||
void set(base_type* base) { m_base = std::shared_ptr<base_type>(base); }
|
||||
base_type* release() { return m_base.release(); }
|
||||
|
||||
Result operator () (Arg2 arg2) { return (*m_base)(arg2); }
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
Result operator () (Discard discard, Arg2 arg2) { return (*m_base)(arg2); }
|
||||
|
||||
private:
|
||||
std::auto_ptr<base_type> m_base;
|
||||
std::shared_ptr<base_type> m_base;
|
||||
};
|
||||
|
||||
template <typename Result, typename Arg1, typename Arg2, typename Arg3>
|
||||
@@ -167,13 +167,13 @@ public:
|
||||
|
||||
bool is_valid() const { return m_base.get() != NULL; }
|
||||
|
||||
void set(base_type* base) { m_base = std::auto_ptr<base_type>(base); }
|
||||
void set(base_type* base) { m_base = std::shared_ptr<base_type>(base); }
|
||||
base_type* release() { return m_base.release(); }
|
||||
|
||||
Result operator () (Arg1 arg1, Arg2 arg2, Arg3 arg3) { return (*m_base)(arg1, arg2, arg3); }
|
||||
|
||||
private:
|
||||
std::auto_ptr<base_type> m_base;
|
||||
std::shared_ptr<base_type> m_base;
|
||||
};
|
||||
|
||||
template <typename Result>
|
||||
|
||||
@@ -38,9 +38,8 @@
|
||||
#define RAK_PRIORITY_QUEUE_DEFAULT_H
|
||||
|
||||
#include <stdexcept>
|
||||
#include <tr1/functional>
|
||||
#include <rak/allocators.h>
|
||||
#include <rak/functional.h>
|
||||
#include <rak/functional_fun.h>
|
||||
#include <rak/priority_queue.h>
|
||||
#include <rak/timer.h>
|
||||
|
||||
@@ -48,33 +47,34 @@ namespace rak {
|
||||
|
||||
class priority_item {
|
||||
public:
|
||||
typedef std::tr1::function<void ()> slot_void;
|
||||
|
||||
priority_item() {}
|
||||
~priority_item() {
|
||||
if (is_queued())
|
||||
throw std::logic_error("priority_item::~priority_item() called on a queued item.");
|
||||
|
||||
m_time = timer();
|
||||
m_slot.set(NULL);
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_slot.is_valid(); }
|
||||
bool is_queued() const { return m_time != timer(); }
|
||||
bool is_valid() const { return !!m_slot; }
|
||||
bool is_queued() const { return m_time != timer(); }
|
||||
|
||||
void call() { m_slot(); }
|
||||
void set_slot(function0<void>::base_type* s) { m_slot.set(s); }
|
||||
void call() { m_slot(); }
|
||||
void set_slot(const slot_void& s) { m_slot = s; }
|
||||
|
||||
const timer& time() const { return m_time; }
|
||||
void clear_time() { m_time = timer(); }
|
||||
void set_time(const timer& t) { m_time = t; }
|
||||
const timer& time() const { return m_time; }
|
||||
void clear_time() { m_time = timer(); }
|
||||
void set_time(const timer& t) { m_time = t; }
|
||||
|
||||
bool compare(const timer& t) const { return m_time > t; }
|
||||
bool compare(const timer& t) const { return m_time > t; }
|
||||
|
||||
private:
|
||||
priority_item(const priority_item&);
|
||||
void operator = (const priority_item&);
|
||||
|
||||
timer m_time;
|
||||
function0<void> m_slot;
|
||||
slot_void m_slot;
|
||||
};
|
||||
|
||||
struct priority_compare {
|
||||
|
||||
@@ -381,6 +381,30 @@ AC_DEFUN([TORRENT_CHECK_TR1], [
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_CHECK_CXX11], [
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING(for C++11 support)
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[[#include <functional>
|
||||
#include <unordered_map>
|
||||
class Foo;
|
||||
typedef std::unordered_map<Foo*, int> Bar;
|
||||
|
||||
union test { Bar b1; };
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CXX11, 1, Define to 1 if your C++ compiler has support for C++11.)
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
]
|
||||
)
|
||||
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_WITH_FASTCGI], [
|
||||
AC_ARG_WITH(fastcgi,
|
||||
[ --with-fastcgi=PATH Enable FastCGI RPC support. (DO NOT USE)],
|
||||
|
||||
@@ -295,3 +295,18 @@ AC_DEFUN([TORRENT_ENABLE_TR1], [
|
||||
TORRENT_CHECK_TR1()
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_ENABLE_CXX11], [
|
||||
AC_ARG_ENABLE(std_c++11,
|
||||
[ --disable-std_c++11 disable check for support for C++11 [[default=enable]]],
|
||||
[
|
||||
if test "$enableval" = "yes"; then
|
||||
TORRENT_CHECK_CXX11()
|
||||
else
|
||||
AC_MSG_CHECKING(for C++11 support)
|
||||
AC_MSG_RESULT(disabled)
|
||||
fi
|
||||
],[
|
||||
TORRENT_CHECK_CXX11()
|
||||
])
|
||||
])
|
||||
|
||||
@@ -362,7 +362,7 @@ f_multicall(core::Download* download, const torrent::Object::list_type& args) {
|
||||
|
||||
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object::create_list())->as_list();
|
||||
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(); cItr != args.end(); cItr++) {
|
||||
const std::string& cmd = cItr->as_string();
|
||||
row.push_back(rpc::parse_command(rpc::make_target(*itr), cmd.c_str(), cmd.c_str() + cmd.size()).first);
|
||||
}
|
||||
@@ -387,7 +387,7 @@ t_multicall(core::Download* download, const torrent::Object::list_type& args) {
|
||||
for (int itr = 0, last = download->tracker_list()->size(); itr != last; itr++) {
|
||||
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object::create_list())->as_list();
|
||||
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(); cItr != args.end(); cItr++) {
|
||||
const std::string& cmd = cItr->as_string();
|
||||
torrent::Tracker* t = download->tracker_list()->at(itr);
|
||||
|
||||
@@ -415,7 +415,7 @@ p_multicall(core::Download* download, const torrent::Object::list_type& args) {
|
||||
itr != last; itr++) {
|
||||
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object::create_list())->as_list();
|
||||
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(); cItr != args.end(); cItr++) {
|
||||
const std::string& cmd = cItr->as_string();
|
||||
|
||||
row.push_back(rpc::parse_command(rpc::make_target(*itr), cmd.c_str(), cmd.c_str() + cmd.size()).first);
|
||||
|
||||
@@ -150,7 +150,7 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
||||
if (!(flags & rpc::object_storage::flag_private))
|
||||
cmd_flags |= rpc::CommandMap::flag_public_xmlrpc;
|
||||
|
||||
rpc::object_storage::iterator obj_itr = control->object_storage()->insert_str(rawKey, value, flags);
|
||||
control->object_storage()->insert_str(rawKey, value, flags);
|
||||
|
||||
if ((flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_function_type ||
|
||||
(flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_multi_type) {
|
||||
@@ -158,7 +158,7 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
||||
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call<rpc::target_type> >::type>
|
||||
(create_new_key<0>(rawKey, ""),
|
||||
std::bind(&rpc::object_storage::call_function_str, control->object_storage(),
|
||||
rawKey, std::placeholders::_1, std::placeholders::_2),
|
||||
rawKey, std::placeholders::_1, std::placeholders::_2),
|
||||
&rpc::command_base_call<rpc::target_type>,
|
||||
cmd_flags, NULL, NULL);
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ d_multicall(const torrent::Object::list_type& args) {
|
||||
for (core::View::const_iterator vItr = (*viewItr)->begin_visible(), vLast = (*viewItr)->end_visible(); vItr != vLast; vItr++) {
|
||||
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object::create_list())->as_list();
|
||||
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
|
||||
for (torrent::Object::list_const_iterator cItr = ++args.begin(); cItr != args.end(); cItr++) {
|
||||
const std::string& cmd = cItr->as_string();
|
||||
row.push_back(rpc::parse_command(rpc::make_target(*vItr), cmd.c_str(), cmd.c_str() + cmd.size()).first);
|
||||
}
|
||||
|
||||
+13
-9
@@ -98,41 +98,41 @@ void initialize_commands();
|
||||
|
||||
#define CMD2_VAR_BOOL(key, value) \
|
||||
control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_bool_type); \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key))); \
|
||||
CMD2_ANY_VALUE(key ".set", std::bind(&rpc::object_storage::set_bool, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
|
||||
#define CMD2_VAR_VALUE(key, value) \
|
||||
control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_value_type); \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key))); \
|
||||
CMD2_ANY_VALUE(key ".set", std::bind(&rpc::object_storage::set_value, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
|
||||
#define CMD2_VAR_STRING(key, value) \
|
||||
control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key))); \
|
||||
CMD2_ANY_STRING(key ".set", std::bind(&rpc::object_storage::set_string, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
|
||||
|
||||
#define CMD2_VAR_C_STRING(key, value) \
|
||||
control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key)));
|
||||
|
||||
#define CMD2_VAR_LIST(key) \
|
||||
control->object_storage()->insert_c_str(key, torrent::Object::create_list(), rpc::object_storage::flag_list_type); \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
CMD2_ANY(key, std::bind(&rpc::object_storage::get, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key))); \
|
||||
CMD2_ANY_LIST(key ".set", std::bind(&rpc::object_storage::set_list, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2)); \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2)); \
|
||||
CMD2_ANY_VOID(key ".push_back", std::bind(&rpc::object_storage::list_push_back, control->object_storage(), \
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
torrent::raw_string::from_c_str(key), std::placeholders::_2));
|
||||
|
||||
#define CMD2_FUNC_SINGLE(key, cmds) \
|
||||
#define CMD2_FUNC_SINGLE(key, cmds) \
|
||||
CMD2_ANY(key, std::bind(&rpc::command_function_call, torrent::raw_string::from_c_str(cmds), \
|
||||
std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
@@ -175,7 +175,11 @@ struct object_convert_type<Functor, void> {
|
||||
template <typename Arg1>
|
||||
torrent::Object operator () (Arg1& arg1) { m_slot(arg1); return torrent::Object(); }
|
||||
template <typename Arg1, typename Arg2>
|
||||
torrent::Object operator () (const Arg1& arg1) { m_slot(arg1); return torrent::Object(); }
|
||||
template <typename Arg1, typename Arg2>
|
||||
torrent::Object operator () (Arg1& arg1, Arg2& arg2) { m_slot(arg1, arg2); return torrent::Object(); }
|
||||
template <typename Arg1, typename Arg2>
|
||||
torrent::Object operator () (const Arg1& arg1, const Arg2& arg2) { m_slot(arg1, arg2); return torrent::Object(); }
|
||||
|
||||
Functor m_slot;
|
||||
};
|
||||
|
||||
@@ -180,10 +180,10 @@ xmlrpc_find_peer(core::Download* download, const torrent::HashString& hash) {
|
||||
void
|
||||
initialize_xmlrpc() {
|
||||
rpc::xmlrpc.initialize();
|
||||
rpc::xmlrpc.set_slot_find_download(rak::mem_fn(control->core()->download_list(), &core::DownloadList::find_hex_ptr));
|
||||
rpc::xmlrpc.set_slot_find_file(rak::ptr_fn(&xmlrpc_find_file));
|
||||
rpc::xmlrpc.set_slot_find_tracker(rak::ptr_fn(&xmlrpc_find_tracker));
|
||||
rpc::xmlrpc.set_slot_find_peer(rak::ptr_fn(&xmlrpc_find_peer));
|
||||
rpc::xmlrpc.slot_find_download() = std::tr1::bind(&core::DownloadList::find_hex_ptr, control->core()->download_list(), std::tr1::placeholders::_1);
|
||||
rpc::xmlrpc.slot_find_file() = std::tr1::bind(&xmlrpc_find_file, std::tr1::placeholders::_1, std::tr1::placeholders::_2);
|
||||
rpc::xmlrpc.slot_find_tracker() = std::tr1::bind(&xmlrpc_find_tracker, std::tr1::placeholders::_1, std::tr1::placeholders::_2);
|
||||
rpc::xmlrpc.slot_find_peer() = std::tr1::bind(&xmlrpc_find_peer, std::tr1::placeholders::_1, std::tr1::placeholders::_2);
|
||||
|
||||
unsigned int count = 0;
|
||||
|
||||
@@ -430,8 +430,6 @@ apply_ipv4_filter_load(const torrent::Object::list_type& args) {
|
||||
if (args.size() != 2)
|
||||
throw torrent::input_error("Incorrect number of arguments.");
|
||||
|
||||
torrent::Object::list_const_iterator args_itr = args.begin();
|
||||
|
||||
std::fstream file(rak::path_expand(args.front().as_string()).c_str(), std::ios::in);
|
||||
|
||||
if (!file.is_open())
|
||||
|
||||
@@ -89,7 +89,7 @@ parse_address_range(const torrent::Object::list_type& args, torrent::Object::lis
|
||||
|
||||
// convert to [begin, end) making sure the end doesn't overflow
|
||||
// (this precludes 255.255.255.255 from ever matching, but that's not a real IP anyway)
|
||||
return std::make_pair<uint32_t, uint32_t>(begin, std::max(end, end + 1));
|
||||
return std::make_pair((uint32_t)begin, (uint32_t)std::max(end, end + 1));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ Control::Control() :
|
||||
|
||||
m_inputStdin->slot_pressed(sigc::mem_fun(m_input, &input::Manager::pressed));
|
||||
|
||||
m_taskShutdown.set_slot(rak::mem_fn(this, &Control::handle_shutdown));
|
||||
m_taskShutdown.set_slot(std::tr1::bind(&Control::handle_shutdown, this));
|
||||
|
||||
m_commandScheduler->set_slot_error_message(rak::mem_fn(m_core, &core::Manager::push_log_std));
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -62,10 +62,10 @@ public:
|
||||
static void resize_term(int x, int y) { resizeterm(y, x); }
|
||||
static void resize_term(std::pair<int, int> dim) { resizeterm(dim.second, dim.first); }
|
||||
|
||||
unsigned int get_x() { int x, y; getyx(m_window, y, x); return x; }
|
||||
unsigned int get_x() { int x, __UNUSED y; getyx(m_window, y, x); return x; }
|
||||
unsigned int get_y() { int x, y; getyx(m_window, y, x); return y; }
|
||||
|
||||
unsigned int width() { int x, y; getmaxyx(m_window, y, x); return x; }
|
||||
unsigned int width() { int x, __UNUSED y; getmaxyx(m_window, y, x); return x; }
|
||||
unsigned int height() { int x, y; getmaxyx(m_window, y, x); return y; }
|
||||
|
||||
void move(unsigned int x, unsigned int y) { wmove(m_window, y, x); }
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
static void initialize();
|
||||
static void cleanup();
|
||||
|
||||
static int get_screen_width() { int x, y; getmaxyx(stdscr, y, x); return x; }
|
||||
static int get_screen_width() { int x, __UNUSED y; getmaxyx(stdscr, y, x); return x; }
|
||||
static int get_screen_height() { int x, y; getmaxyx(stdscr, y, x); return y; }
|
||||
|
||||
static std::pair<int, int> term_size();
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace display {
|
||||
Manager::Manager() :
|
||||
m_forceRedraw(false) {
|
||||
|
||||
m_taskUpdate.set_slot(rak::mem_fn(this, &Manager::receive_update));
|
||||
m_taskUpdate.set_slot(std::tr1::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.set_slot(rak::mem_fn(this, &Window::redraw));
|
||||
m_taskUpdate.set_slot(std::tr1::bind(&Window::redraw, this));
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
|
||||
@@ -93,16 +93,15 @@ WindowDownloadList::redraw() {
|
||||
|
||||
while (range.first != range.second) {
|
||||
char buffer[m_canvas->width() + 1];
|
||||
char* position;
|
||||
char* last = buffer + m_canvas->width() - 2 + 1;
|
||||
|
||||
position = print_download_title(buffer, last, *range.first);
|
||||
print_download_title(buffer, last, *range.first);
|
||||
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
|
||||
|
||||
position = print_download_info(buffer, last, *range.first);
|
||||
print_download_info(buffer, last, *range.first);
|
||||
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
|
||||
|
||||
position = print_download_status(buffer, last, *range.first);
|
||||
print_download_status(buffer, last, *range.first);
|
||||
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
|
||||
|
||||
++range.first;
|
||||
|
||||
@@ -63,33 +63,31 @@ WindowDownloadStatusbar::redraw() {
|
||||
m_canvas->erase();
|
||||
|
||||
char buffer[m_canvas->width()];
|
||||
char* position;
|
||||
char* last = buffer + m_canvas->width() - 2;
|
||||
|
||||
position = print_download_info(buffer, last, m_download);
|
||||
print_download_info(buffer, last, m_download);
|
||||
m_canvas->print(0, 0, "%s", buffer);
|
||||
|
||||
position = buffer + std::min<ptrdiff_t>(std::max(snprintf(buffer, last - buffer, "Peers: %i(%i) Min/Max: %i/%i Slots: U:%i/%i D:%i/%i U/I/C/A: %i/%i/%i/%i Unchoked: %u/%u Failed: %i",
|
||||
(int)m_download->download()->connection_list()->size(),
|
||||
(int)m_download->download()->peer_list()->available_list_size(),
|
||||
(int)m_download->download()->connection_list()->min_size(),
|
||||
(int)m_download->download()->connection_list()->max_size(),
|
||||
(int)m_download->download()->uploads_min(),
|
||||
(int)m_download->download()->uploads_max(),
|
||||
(int)m_download->download()->downloads_min(),
|
||||
(int)m_download->download()->downloads_max(),
|
||||
(int)m_download->download()->peers_currently_unchoked(),
|
||||
(int)m_download->download()->peers_currently_interested(),
|
||||
(int)m_download->download()->peers_complete(),
|
||||
(int)m_download->download()->peers_accounted(),
|
||||
(int)m_download->info()->upload_unchoked(),
|
||||
(int)m_download->info()->download_unchoked(),
|
||||
(int)m_download->chunks_failed()),
|
||||
0), last - buffer);
|
||||
snprintf(buffer, last - buffer, "Peers: %i(%i) Min/Max: %i/%i Slots: U:%i/%i D:%i/%i U/I/C/A: %i/%i/%i/%i Unchoked: %u/%u Failed: %i",
|
||||
(int)m_download->download()->connection_list()->size(),
|
||||
(int)m_download->download()->peer_list()->available_list_size(),
|
||||
(int)m_download->download()->connection_list()->min_size(),
|
||||
(int)m_download->download()->connection_list()->max_size(),
|
||||
(int)m_download->download()->uploads_min(),
|
||||
(int)m_download->download()->uploads_max(),
|
||||
(int)m_download->download()->downloads_min(),
|
||||
(int)m_download->download()->downloads_max(),
|
||||
(int)m_download->download()->peers_currently_unchoked(),
|
||||
(int)m_download->download()->peers_currently_interested(),
|
||||
(int)m_download->download()->peers_complete(),
|
||||
(int)m_download->download()->peers_accounted(),
|
||||
(int)m_download->info()->upload_unchoked(),
|
||||
(int)m_download->info()->download_unchoked(),
|
||||
(int)m_download->chunks_failed());
|
||||
|
||||
m_canvas->print(0, 1, "%s", buffer);
|
||||
|
||||
position = print_download_status(buffer, last, m_download);
|
||||
print_download_status(buffer, last, m_download);
|
||||
m_canvas->print(0, 2, "[%c:%i] %s",
|
||||
m_download->tracker_list()->has_active() ? 'C' : ' ',
|
||||
(int)(m_download->download()->tracker_controller()->seconds_to_next_timeout()),
|
||||
|
||||
@@ -48,7 +48,7 @@ WindowLog::WindowLog(core::Log* l) :
|
||||
Window(new Canvas, 0, 0, 0, extent_full, extent_static),
|
||||
m_log(l) {
|
||||
|
||||
m_taskUpdate.set_slot(rak::mem_fn(this, &WindowLog::receive_update)),
|
||||
m_taskUpdate.set_slot(std::tr1::bind(&WindowLog::receive_update, this)),
|
||||
|
||||
// We're trying out scheduled tasks instead.
|
||||
m_connUpdate = l->signal_update().connect(sigc::mem_fun(*this, &WindowLog::receive_update));
|
||||
|
||||
@@ -76,8 +76,6 @@
|
||||
#include "thread_main.h"
|
||||
#include "thread_worker.h"
|
||||
|
||||
namespace std { using namespace tr1; }
|
||||
|
||||
void handle_sigbus(int signum, siginfo_t* sa, void* ptr);
|
||||
void do_panic(int signum);
|
||||
void print_help();
|
||||
|
||||
+8
-3
@@ -47,9 +47,7 @@
|
||||
#include <torrent/data/file_list_iterator.h>
|
||||
|
||||
// Move into config.h or something.
|
||||
namespace std {
|
||||
using namespace tr1;
|
||||
}
|
||||
namespace tr1 { using namespace std::tr1; }
|
||||
|
||||
namespace core {
|
||||
class Download;
|
||||
@@ -210,9 +208,16 @@ protected:
|
||||
// within commands. E.d. callable command strings where one of the
|
||||
// arguments within the command needs to be supplied by the caller.
|
||||
|
||||
#ifdef HAVE_CXX11
|
||||
union {
|
||||
base_function t_pod;
|
||||
// char t_pod[sizeof(base_function)];
|
||||
};
|
||||
#else
|
||||
union {
|
||||
char t_pod[sizeof(base_function)];
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename T1 = void, typename T2 = void>
|
||||
|
||||
@@ -71,7 +71,7 @@ CommandScheduler::insert(const std::string& key) {
|
||||
delete *itr;
|
||||
|
||||
*itr = new CommandSchedulerItem(key);
|
||||
(*itr)->set_slot(rak::bind_mem_fn(this, &CommandScheduler::call_item, *itr));
|
||||
(*itr)->set_slot(std::tr1::bind(&CommandScheduler::call_item, this, *itr));
|
||||
|
||||
return itr;
|
||||
}
|
||||
|
||||
@@ -39,13 +39,14 @@
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
#include <tr1/functional>
|
||||
#include <torrent/object.h>
|
||||
|
||||
namespace rpc {
|
||||
|
||||
class CommandSchedulerItem {
|
||||
public:
|
||||
typedef rak::function0<void> Slot;
|
||||
typedef std::tr1::function<void ()> slot_void;
|
||||
|
||||
CommandSchedulerItem(const std::string& key) : m_key(key), m_interval(0) {}
|
||||
~CommandSchedulerItem();
|
||||
@@ -65,7 +66,7 @@ public:
|
||||
rak::timer time_scheduled() const { return m_timeScheduled; }
|
||||
rak::timer next_time_scheduled() const;
|
||||
|
||||
void set_slot(Slot::base_type* s) { m_task.set_slot(s); }
|
||||
void set_slot(const slot_void& s) { m_task.set_slot(s); }
|
||||
|
||||
private:
|
||||
CommandSchedulerItem(const CommandSchedulerItem&);
|
||||
|
||||
@@ -246,7 +246,7 @@ object_storage::rlookup_list(const std::string& cmd_key) {
|
||||
|
||||
if (r_itr != m_rlookup.end())
|
||||
std::transform(r_itr->second.begin(), r_itr->second.end(), std::back_inserter(result),
|
||||
std::bind(&key_type::c_str, std::bind(rak::mem_ptr(&value_type::first), std::placeholders::_1)));
|
||||
std::tr1::bind(&key_type::c_str, std::tr1::bind(rak::mem_ptr(&value_type::first), std::tr1::placeholders::_1)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ struct object_storage_node {
|
||||
char flags;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<fixed_key_type<64>, object_storage_node, hash_fixed_key_type> object_storage_base_type;
|
||||
typedef std::tr1::unordered_map<fixed_key_type<64>, object_storage_node, hash_fixed_key_type> object_storage_base_type;
|
||||
|
||||
class object_storage : private object_storage_base_type {
|
||||
public:
|
||||
|
||||
+6
-6
@@ -156,7 +156,7 @@ xmlrpc_to_target(xmlrpc_env* env, xmlrpc_value* value) {
|
||||
throw xmlrpc_error(XMLRPC_TYPE_ERROR, "Unsupported target type found.");
|
||||
}
|
||||
|
||||
core::Download* download = xmlrpc.get_slot_find_download()(str);
|
||||
core::Download* download = xmlrpc.slot_find_download()(str);
|
||||
|
||||
if (download == NULL) {
|
||||
::free((void*)str);
|
||||
@@ -186,7 +186,7 @@ xmlrpc_to_target(xmlrpc_env* env, xmlrpc_value* value) {
|
||||
if (*str == '\0' || *end_ptr != '\0')
|
||||
throw xmlrpc_error(XMLRPC_TYPE_ERROR, "Invalid index.");
|
||||
|
||||
target = rpc::make_target(XmlRpc::call_file, xmlrpc.get_slot_find_file()(download, index));
|
||||
target = rpc::make_target(XmlRpc::call_file, xmlrpc.slot_find_file()(download, index));
|
||||
break;
|
||||
|
||||
case 't':
|
||||
@@ -195,7 +195,7 @@ xmlrpc_to_target(xmlrpc_env* env, xmlrpc_value* value) {
|
||||
if (*str == '\0' || *end_ptr != '\0')
|
||||
throw xmlrpc_error(XMLRPC_TYPE_ERROR, "Invalid index.");
|
||||
|
||||
target = rpc::make_target(XmlRpc::call_tracker, xmlrpc.get_slot_find_tracker()(download, index));
|
||||
target = rpc::make_target(XmlRpc::call_tracker, xmlrpc.slot_find_tracker()(download, index));
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
@@ -206,7 +206,7 @@ xmlrpc_to_target(xmlrpc_env* env, xmlrpc_value* value) {
|
||||
if (hash_end == end_ptr || *hash_end != '\0')
|
||||
throw xmlrpc_error(XMLRPC_TYPE_ERROR, "Not a hash string.");
|
||||
|
||||
target = rpc::make_target(XmlRpc::call_peer, xmlrpc.get_slot_find_peer()(download, hash));
|
||||
target = rpc::make_target(XmlRpc::call_peer, xmlrpc.slot_find_peer()(download, hash));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -233,8 +233,8 @@ xmlrpc_to_index_type(int index, int callType, core::Download* download) {
|
||||
void* result;
|
||||
|
||||
switch (callType) {
|
||||
case XmlRpc::call_file: result = xmlrpc.get_slot_find_file()(download, index); break;
|
||||
case XmlRpc::call_tracker: result = xmlrpc.get_slot_find_tracker()(download, index); break;
|
||||
case XmlRpc::call_file: result = xmlrpc.slot_find_file()(download, index); break;
|
||||
case XmlRpc::call_tracker: result = xmlrpc.slot_find_tracker()(download, index); break;
|
||||
default: result = NULL; break;
|
||||
}
|
||||
|
||||
|
||||
+14
-21
@@ -37,7 +37,7 @@
|
||||
#ifndef RTORRENT_RPC_XMLRPC_H
|
||||
#define RTORRENT_RPC_XMLRPC_H
|
||||
|
||||
#include <rak/functional_fun.h>
|
||||
#include <tr1/functional>
|
||||
#include <torrent/hash_string.h>
|
||||
|
||||
namespace core {
|
||||
@@ -54,11 +54,11 @@ namespace rpc {
|
||||
|
||||
class XmlRpc {
|
||||
public:
|
||||
typedef rak::function1<core::Download*, const char*> slot_find_download;
|
||||
typedef rak::function2<torrent::File*, core::Download*, uint32_t> slot_find_file;
|
||||
typedef rak::function2<torrent::Tracker*, core::Download*, uint32_t> slot_find_tracker;
|
||||
typedef rak::function2<torrent::Peer*, core::Download*, const torrent::HashString&> slot_find_peer;
|
||||
typedef rak::function2<bool, const char*, uint32_t> slot_write;
|
||||
typedef std::tr1::function<core::Download* (const char*)> slot_download;
|
||||
typedef std::tr1::function<torrent::File* (core::Download*, uint32_t)> slot_file;
|
||||
typedef std::tr1::function<torrent::Tracker* (core::Download*, uint32_t)> slot_tracker;
|
||||
typedef std::tr1::function<torrent::Peer* (core::Download*, const torrent::HashString&)> slot_peer;
|
||||
typedef std::tr1::function<bool (const char*, uint32_t)> slot_write;
|
||||
|
||||
static const int dialect_generic = 0;
|
||||
static const int dialect_i8 = 1;
|
||||
@@ -87,17 +87,10 @@ public:
|
||||
int dialect() { return m_dialect; }
|
||||
void set_dialect(int dialect);
|
||||
|
||||
slot_find_download& get_slot_find_download() { return m_slotFindDownload; }
|
||||
void set_slot_find_download(slot_find_download::base_type* slot) { m_slotFindDownload.set(slot); }
|
||||
|
||||
slot_find_file& get_slot_find_file() { return m_slotFindFile; }
|
||||
void set_slot_find_file(slot_find_file::base_type* slot) { m_slotFindFile.set(slot); }
|
||||
|
||||
slot_find_tracker& get_slot_find_tracker() { return m_slotFindTracker; }
|
||||
void set_slot_find_tracker(slot_find_tracker::base_type* slot) { m_slotFindTracker.set(slot); }
|
||||
|
||||
slot_find_peer& get_slot_find_peer() { return m_slotFindPeer; }
|
||||
void set_slot_find_peer(slot_find_peer::base_type* slot) { m_slotFindPeer.set(slot); }
|
||||
slot_download& slot_find_download() { return m_slotFindDownload; }
|
||||
slot_file& slot_find_file() { return m_slotFindFile; }
|
||||
slot_tracker& slot_find_tracker() { return m_slotFindTracker; }
|
||||
slot_peer& slot_find_peer() { return m_slotFindPeer; }
|
||||
|
||||
static int64_t size_limit();
|
||||
static void set_size_limit(uint64_t size);
|
||||
@@ -108,10 +101,10 @@ private:
|
||||
|
||||
int m_dialect;
|
||||
|
||||
slot_find_download m_slotFindDownload;
|
||||
slot_find_file m_slotFindFile;
|
||||
slot_find_tracker m_slotFindTracker;
|
||||
slot_find_peer m_slotFindPeer;
|
||||
slot_download m_slotFindDownload;
|
||||
slot_file m_slotFindFile;
|
||||
slot_tracker m_slotFindTracker;
|
||||
slot_peer m_slotFindPeer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ ThreadBase::ThreadBase() :
|
||||
// create_poll_manager calls in that case.
|
||||
std::memset(&m_thread, 0, sizeof(pthread_t));
|
||||
|
||||
m_taskShutdown.set_slot(rak::ptr_fn(&throw_shutdown_exception));
|
||||
m_taskShutdown.set_slot(std::tr1::bind(&throw_shutdown_exception));
|
||||
|
||||
m_threadQueue = new thread_queue_hack;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "rpc/parse_commands.h"
|
||||
|
||||
ThreadWorker::ThreadWorker() {
|
||||
m_taskTouchLog.set_slot(rak::mem_fn(this, &ThreadWorker::task_touch_log));
|
||||
m_taskTouchLog.set_slot(std::tr1::bind(&ThreadWorker::task_touch_log, this));
|
||||
}
|
||||
|
||||
ThreadWorker::~ThreadWorker() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "command_helpers.h"
|
||||
#include "rpc/command_map.h"
|
||||
|
||||
#import "command_map_test.h"
|
||||
#include "command_map_test.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CommandMapTest);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <torrent/object.h>
|
||||
#include "rpc/command_map.h"
|
||||
|
||||
#import "command_slot_test.h"
|
||||
#include "command_slot_test.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CommandSlotTest);
|
||||
|
||||
@@ -25,7 +25,7 @@ CommandSlotTest::test_basics() {
|
||||
// test_any.set_function<rpc::any_function>(&cmd_test_a);
|
||||
// CPPUNIT_ASSERT(rpc::command_base_call_any(&test_any, rpc::make_target(), (int64_t)1).as_value() == 1);
|
||||
|
||||
// test_any.set_function<rpc::any_function>(std::bind(&cmd_test_b, std::placeholders::_1, std::placeholders::_2, (uint64_t)2));
|
||||
// test_any.set_function<rpc::any_function>(tr1::bind(&cmd_test_b, tr1::placeholders::_1, tr1::placeholders::_2, (uint64_t)2));
|
||||
// CPPUNIT_ASSERT(rpc::command_base_call_any(&test_any, rpc::make_target(), (int64_t)1).as_value() == 2);
|
||||
|
||||
// test_any.set_function<rpc::any_list_function>(&cmd_test_list);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#import "command_test.h"
|
||||
#include "command_test.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(CommandTest);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#import "object_storage_test.h"
|
||||
#include "object_storage_test.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(ObjectStorageTest);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#import "command_dynamic_test.h"
|
||||
#include "command_dynamic_test.h"
|
||||
|
||||
#include "rpc/parse_commands.h"
|
||||
#include "control.h"
|
||||
|
||||
Reference in New Issue
Block a user