mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Convert vars into refs to avoid copy construction from const refs
This commit is contained in:
parent
400792d18e
commit
92a290895b
3 changed files with 4 additions and 4 deletions
|
@ -434,9 +434,9 @@ void SyncController::maindataAction()
|
|||
data["torrents"] = torrents;
|
||||
|
||||
QVariantHash categories;
|
||||
const auto categoriesList = session->categories();
|
||||
const auto &categoriesList = session->categories();
|
||||
for (auto it = categoriesList.cbegin(); it != categoriesList.cend(); ++it) {
|
||||
const auto key = it.key();
|
||||
const auto &key = it.key();
|
||||
categories[key] = QVariantMap {
|
||||
{"name", key},
|
||||
{"savePath", it.value()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue