mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-06 18:22:32 +00:00
Replaced std::placeholders with tr1::placholders.
This commit is contained in:
+18
-18
@@ -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(rawKey),
|
||||
tr1::bind(&rpc::object_storage::call_function_str, control->object_storage(),
|
||||
rawKey, std::placeholders::_1, std::placeholders::_2),
|
||||
rawKey, tr1::placeholders::_1, tr1::placeholders::_2),
|
||||
&rpc::command_base_call<rpc::target_type>,
|
||||
cmd_flags, NULL, NULL);
|
||||
|
||||
@@ -188,21 +188,21 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
||||
case rpc::object_storage::flag_bool_type:
|
||||
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type>
|
||||
(create_new_key<5>(rawKey, ".set"),
|
||||
tr1::bind(&rpc::object_storage::set_str_bool, control->object_storage(), rawKey, std::placeholders::_2),
|
||||
tr1::bind(&rpc::object_storage::set_str_bool, control->object_storage(), rawKey, tr1::placeholders::_2),
|
||||
&rpc::command_base_call_value<rpc::target_type>,
|
||||
cmd_flags, NULL, NULL);
|
||||
break;
|
||||
case rpc::object_storage::flag_value_type:
|
||||
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type>
|
||||
(create_new_key<5>(rawKey, ".set"),
|
||||
tr1::bind(&rpc::object_storage::set_str_value, control->object_storage(), rawKey, std::placeholders::_2),
|
||||
tr1::bind(&rpc::object_storage::set_str_value, control->object_storage(), rawKey, tr1::placeholders::_2),
|
||||
&rpc::command_base_call_value<rpc::target_type>,
|
||||
cmd_flags, NULL, NULL);
|
||||
break;
|
||||
case rpc::object_storage::flag_string_type:
|
||||
rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_string<rpc::target_type> >::type>
|
||||
(create_new_key<5>(rawKey, ".set"),
|
||||
tr1::bind(&rpc::object_storage::set_str_string, control->object_storage(), rawKey, std::placeholders::_2),
|
||||
tr1::bind(&rpc::object_storage::set_str_string, control->object_storage(), rawKey, tr1::placeholders::_2),
|
||||
&rpc::command_base_call_string<rpc::target_type>,
|
||||
cmd_flags, NULL, NULL);
|
||||
break;
|
||||
@@ -423,36 +423,36 @@ system_method_list_keys(const torrent::Object::string_type& args) {
|
||||
}
|
||||
|
||||
#define CMD2_METHOD_INSERT(key, flags) \
|
||||
CMD2_ANY_LIST(key, tr1::bind(&system_method_insert_object, std::placeholders::_2, flags));
|
||||
CMD2_ANY_LIST(key, tr1::bind(&system_method_insert_object, tr1::placeholders::_2, flags));
|
||||
|
||||
void
|
||||
initialize_command_dynamic() {
|
||||
CMD2_VAR_BOOL ("method.use_deprecated", true);
|
||||
CMD2_VAR_VALUE ("method.use_intermediate", 1);
|
||||
|
||||
CMD2_ANY_LIST ("method.insert", tr1::bind(&system_method_insert, std::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.insert.value", tr1::bind(&system_method_insert_object, std::placeholders::_2, rpc::object_storage::flag_value_type));
|
||||
CMD2_ANY_LIST ("method.insert", tr1::bind(&system_method_insert, tr1::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.insert.value", tr1::bind(&system_method_insert_object, tr1::placeholders::_2, rpc::object_storage::flag_value_type));
|
||||
|
||||
CMD2_METHOD_INSERT("method.insert.simple", rpc::object_storage::flag_function_type);
|
||||
CMD2_METHOD_INSERT("method.insert.c_simple", rpc::object_storage::flag_constant | rpc::object_storage::flag_function_type);
|
||||
CMD2_METHOD_INSERT("method.insert.s_c_simple", rpc::object_storage::flag_static |
|
||||
rpc::object_storage::flag_constant |rpc::object_storage::flag_function_type);
|
||||
|
||||
CMD2_ANY_STRING ("method.erase", tr1::bind(&system_method_erase, std::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.redirect", tr1::bind(&system_method_redirect, std::placeholders::_2));
|
||||
CMD2_ANY_STRING ("method.erase", tr1::bind(&system_method_erase, tr1::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.redirect", tr1::bind(&system_method_redirect, tr1::placeholders::_2));
|
||||
CMD2_ANY_STRING ("method.get", tr1::bind(&rpc::object_storage::get_str, control->object_storage(),
|
||||
std::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.set", tr1::bind(&system_method_set_function, std::placeholders::_2));
|
||||
tr1::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.set", tr1::bind(&system_method_set_function, tr1::placeholders::_2));
|
||||
|
||||
CMD2_ANY_STRING ("method.const", tr1::bind(&rpc::object_storage::has_flag_str, control->object_storage(),
|
||||
std::placeholders::_2, rpc::object_storage::flag_constant));
|
||||
tr1::placeholders::_2, rpc::object_storage::flag_constant));
|
||||
CMD2_ANY_STRING_V("method.const.enable", tr1::bind(&rpc::object_storage::enable_flag_str, control->object_storage(),
|
||||
std::placeholders::_2, rpc::object_storage::flag_constant));
|
||||
tr1::placeholders::_2, rpc::object_storage::flag_constant));
|
||||
|
||||
CMD2_ANY_LIST ("method.has_key", tr1::bind(&system_method_has_key, std::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.set_key", tr1::bind(&system_method_set_key, std::placeholders::_2));
|
||||
CMD2_ANY_STRING ("method.list_keys", tr1::bind(&system_method_list_keys, std::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.has_key", tr1::bind(&system_method_has_key, tr1::placeholders::_2));
|
||||
CMD2_ANY_LIST ("method.set_key", tr1::bind(&system_method_set_key, tr1::placeholders::_2));
|
||||
CMD2_ANY_STRING ("method.list_keys", tr1::bind(&system_method_list_keys, tr1::placeholders::_2));
|
||||
|
||||
CMD2_ANY_STRING ("method.rlookup", tr1::bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), std::placeholders::_2));
|
||||
CMD2_ANY_STRING_V("method.rlookup.clear", tr1::bind(&rpc::object_storage::rlookup_clear, control->object_storage(), std::placeholders::_2));
|
||||
CMD2_ANY_STRING ("method.rlookup", tr1::bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), tr1::placeholders::_2));
|
||||
CMD2_ANY_STRING_V("method.rlookup.clear", tr1::bind(&rpc::object_storage::rlookup_clear, control->object_storage(), tr1::placeholders::_2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user