* Changed command_base stored in CommandMap from a pointer to an instance.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1169 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-04-30 12:16:45 +00:00
parent 8b03988612
commit d9f409b223
9 changed files with 80 additions and 151 deletions
-10
View File
@@ -511,16 +511,6 @@ d_list_remove(core::Download* download, const torrent::Object& rawArgs, const ch
return torrent::Object();
}
void
add_copy_to_download(const char* src, const char* dest) {
rpc::CommandMap::iterator itr = rpc::commands.find(src);
if (itr == rpc::commands.end())
throw torrent::internal_error("add_copy_to_download(...) key not found.");
rpc::commands.insert(dest, itr->second);
}
#define CMD_ON_INFO(func) rak::on(std::mem_fun(&core::Download::info), std::mem_fun(&torrent::DownloadInfo::func))
#define CMD2_ON_INFO(func) std::tr1::bind(&torrent::DownloadInfo::func, std::tr1::bind(&core::Download::info, std::tr1::placeholders::_1))