don't use pointers to resume_data and file_priorities in add_torrent_params

This commit is contained in:
Arvid Norberg
2013-07-17 20:21:48 +00:00
parent f10bedf035
commit 9c9135bfc4
9 changed files with 17 additions and 29 deletions

View File

@@ -977,9 +977,7 @@ void test_fastresume(std::string const& test_path)
p.ti = new torrent_info(*t);
p.save_path = combine_path(test_path, "tmp1");
p.storage_mode = storage_mode_compact;
std::vector<char> resume_buf;
bencode(std::back_inserter(resume_buf), resume);
p.resume_data = &resume_buf;
bencode(std::back_inserter(p.resume_data), resume);
torrent_handle h = ses.add_torrent(p, ec);
std::auto_ptr<alert> a = ses.pop_alert();
@@ -1071,9 +1069,7 @@ void test_rename_file_in_fastresume(std::string const& test_path)
p.ti = new torrent_info(*t);
p.save_path = combine_path(test_path, "tmp2");
p.storage_mode = storage_mode_compact;
std::vector<char> resume_buf;
bencode(std::back_inserter(resume_buf), resume);
p.resume_data = &resume_buf;
bencode(std::back_inserter(p.resume_data), resume);
torrent_handle h = ses.add_torrent(p, ec);
for (int i = 0; i < 5; ++i)