mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 14:12:30 -06:00
Use reference whenever possible
This commit is contained in:
@@ -171,7 +171,7 @@ void CustomDiskIOThread::async_set_file_priority(lt::storage_index_t storage, lt
|
||||
, std::function<void (const lt::storage_error &, lt::aux::vector<lt::download_priority_t, lt::file_index_t>)> handler)
|
||||
{
|
||||
m_nativeDiskIO->async_set_file_priority(storage, priorities
|
||||
, [=, handler = std::move(handler)](const lt::storage_error &error, lt::aux::vector<lt::download_priority_t, lt::file_index_t> priorities)
|
||||
, [=, handler = std::move(handler)](const lt::storage_error &error, const lt::aux::vector<lt::download_priority_t, lt::file_index_t> &priorities)
|
||||
{
|
||||
m_storageData[storage].filePriorities = priorities;
|
||||
handler(error, priorities);
|
||||
|
||||
@@ -4986,7 +4986,7 @@ void SessionImpl::upgradeCategories()
|
||||
const auto legacyCategories = SettingValue<QVariantMap>(u"BitTorrent/Session/Categories"_qs).get();
|
||||
for (auto it = legacyCategories.cbegin(); it != legacyCategories.cend(); ++it)
|
||||
{
|
||||
const QString categoryName = it.key();
|
||||
const QString &categoryName = it.key();
|
||||
CategoryOptions categoryOptions;
|
||||
categoryOptions.savePath = Path(it.value().toString());
|
||||
m_categories[categoryName] = categoryOptions;
|
||||
|
||||
@@ -1632,7 +1632,7 @@ void TorrentImpl::endReceivedMetadataHandling(const Path &savePath, const PathLi
|
||||
{
|
||||
const auto nativeIndex = nativeIndexes.at(i);
|
||||
|
||||
const Path actualFilePath = fileNames.at(i);
|
||||
const Path &actualFilePath = fileNames.at(i);
|
||||
p.renamed_files[nativeIndex] = actualFilePath.toString().toStdString();
|
||||
|
||||
const Path filePath = actualFilePath.removedExtension(QB_EXT);
|
||||
|
||||
Reference in New Issue
Block a user