mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-15 12:41:36 +03:00
Don't create redundant "buf" variable
This commit is contained in:
parent
a4d2df575e
commit
26f645bd6c
1 changed files with 1 additions and 2 deletions
|
@ -1749,7 +1749,6 @@ bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri
|
||||||
|
|
||||||
libt::add_torrent_params p;
|
libt::add_torrent_params p;
|
||||||
InfoHash hash;
|
InfoHash hash;
|
||||||
std::vector<char> buf(fastresumeData.constData(), fastresumeData.constData() + fastresumeData.size());
|
|
||||||
std::vector<boost::uint8_t> filePriorities;
|
std::vector<boost::uint8_t> filePriorities;
|
||||||
|
|
||||||
QString savePath;
|
QString savePath;
|
||||||
|
@ -1803,7 +1802,7 @@ bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri
|
||||||
|
|
||||||
if (addData.resumed && !fromMagnetUri) {
|
if (addData.resumed && !fromMagnetUri) {
|
||||||
// Set torrent fast resume data
|
// Set torrent fast resume data
|
||||||
p.resume_data = buf;
|
p.resume_data = {fastresumeData.constData(), fastresumeData.constData() + fastresumeData.size()};
|
||||||
p.flags |= libt::add_torrent_params::flag_use_resume_save_path;
|
p.flags |= libt::add_torrent_params::flag_use_resume_save_path;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue