forked from premiere/premiere-libtorrent
Pass std::string directly
This commit is contained in:
parent
e8a02b85b8
commit
b743ef44e9
|
@ -633,7 +633,7 @@ void load_torrent(libtorrent::sha1_hash const& ih, std::vector<char>& buf, libto
|
||||||
ec.assign(boost::system::errc::no_such_file_or_directory, boost::system::generic_category());
|
ec.assign(boost::system::errc::no_such_file_or_directory, boost::system::generic_category());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
load_file(i->second.c_str(), buf, ec);
|
load_file(i->second, buf, ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if non-empty, a peer that will be added to all torrents
|
// if non-empty, a peer that will be added to all torrents
|
||||||
|
@ -710,7 +710,7 @@ void add_torrent(libtorrent::session& ses
|
||||||
, leaf_path(torrent) + ".resume"));
|
, leaf_path(torrent) + ".resume"));
|
||||||
|
|
||||||
error_code ec;
|
error_code ec;
|
||||||
load_file(filename.c_str(), p.resume_data, ec);
|
load_file(filename, p.resume_data, ec);
|
||||||
|
|
||||||
p.url = path_to_url(torrent);
|
p.url = path_to_url(torrent);
|
||||||
p.save_path = save_path;
|
p.save_path = save_path;
|
||||||
|
@ -1638,7 +1638,7 @@ int main(int argc, char* argv[])
|
||||||
std::string filename = path_append(save_path, path_append(".resume"
|
std::string filename = path_append(save_path, path_append(".resume"
|
||||||
, to_hex(tmp.info_hash.to_string()) + ".resume"));
|
, to_hex(tmp.info_hash.to_string()) + ".resume"));
|
||||||
|
|
||||||
load_file(filename.c_str(), p.resume_data, ec);
|
load_file(filename, p.resume_data, ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("adding URL: %s\n", i->c_str());
|
printf("adding URL: %s\n", i->c_str());
|
||||||
|
@ -1779,7 +1779,7 @@ int main(int argc, char* argv[])
|
||||||
std::string filename = path_append(save_path, path_append(".resume"
|
std::string filename = path_append(save_path, path_append(".resume"
|
||||||
, to_hex(tmp.info_hash.to_string()) + ".resume"));
|
, to_hex(tmp.info_hash.to_string()) + ".resume"));
|
||||||
|
|
||||||
load_file(filename.c_str(), p.resume_data, ec);
|
load_file(filename, p.resume_data, ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("adding URL: %s\n", url);
|
printf("adding URL: %s\n", url);
|
||||||
|
|
Loading…
Reference in New Issue