* Added insert_preserve helper functions to torrent::Object.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1000 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-11-01 08:32:08 +00:00
parent ff2c25bdeb
commit c326c7f43a
11 changed files with 31 additions and 43 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ apply_d_change_link(int changeType, core::Download* download, const torrent::Obj
if (args.size() != 3)
throw torrent::input_error("Wrong argument count.");
torrent::Object::list_type::const_iterator itr = args.begin();
torrent::Object::list_const_iterator itr = args.begin();
const std::string& type = (itr++)->as_string();
const std::string& prefix = (itr++)->as_string();
@@ -251,7 +251,7 @@ f_multicall(core::Download* download, const torrent::Object& rawArgs) {
for (torrent::FileList::const_iterator itr = download->file_list()->begin(), last = download->file_list()->end(); itr != last; itr++) {
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object(torrent::Object::TYPE_LIST))->as_list();
for (torrent::Object::list_type::const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); 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);
}
@@ -278,7 +278,7 @@ t_multicall(core::Download* download, const torrent::Object& rawArgs) {
for (int itr = 0, last = download->tracker_list()->size(); itr != last; itr++) {
torrent::Object::list_type& row = result.insert(result.end(), torrent::Object(torrent::Object::TYPE_LIST))->as_list();
for (torrent::Object::list_type::const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
for (torrent::Object::list_const_iterator cItr = ++args.begin(), cLast = args.end(); cItr != args.end(); cItr++) {
const std::string& cmd = cItr->as_string();
torrent::Tracker t = download->tracker_list()->get(itr);