From 26f645bd6cb1d615a89917aa4c3b935dad69f3e3 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Tue, 2 May 2017 14:04:11 +0300 Subject: [PATCH] Don't create redundant "buf" variable --- src/base/bittorrent/session.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 90b31b05b..4642c12e2 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1749,7 +1749,6 @@ bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri libt::add_torrent_params p; InfoHash hash; - std::vector buf(fastresumeData.constData(), fastresumeData.constData() + fastresumeData.size()); std::vector filePriorities; QString savePath; @@ -1803,7 +1802,7 @@ bool Session::addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri if (addData.resumed && !fromMagnetUri) { // 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; } else {