* Added 'p.is_unwanted' and 'p.is_preferred' commands.

* Removed std::tr1:: in favor of std:: using namespace.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1202 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-04-07 08:41:16 +00:00
parent 18a6c61956
commit 6f71a8c1b1
16 changed files with 392 additions and 401 deletions
+7 -2
View File
@@ -46,6 +46,11 @@
#include <torrent/object.h>
#include <torrent/data/file_list_iterator.h>
// Move into config.h or something.
namespace std {
using namespace tr1;
}
namespace core {
class Download;
}
@@ -108,7 +113,7 @@ typedef rt_triple<int, void*, void*> target_type;
class command_base;
typedef const torrent::Object (*command_base_call_type)(command_base*, target_type, const torrent::Object&);
typedef std::tr1::function<torrent::Object (target_type, const torrent::Object&)> base_function;
typedef std::function<torrent::Object (target_type, const torrent::Object&)> base_function;
template <typename tmpl> struct command_base_is_valid {};
template <command_base_call_type tmpl_func> struct command_base_is_type {};
@@ -240,7 +245,7 @@ command_base::_call(command_base* cmd, target_type target, Args args) {
}
#define COMMAND_BASE_TEMPLATE_TYPE(func_type, func_parm) \
template <typename T, int proper = target_type_id<T>::proper_type> struct func_type { typedef std::tr1::function<func_parm> type; }; \
template <typename T, int proper = target_type_id<T>::proper_type> struct func_type { typedef std::function<func_parm> type; }; \
\
template <> struct command_base_is_valid<func_type<target_type>::type> { static const int value = 1; }; \
template <> struct command_base_is_valid<func_type<core::Download*>::type> { static const int value = 1; }; \