From c30b5183aeea55290ec9072cac958cd6e90fdf30 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sun, 24 Sep 2023 05:46:09 -0500 Subject: Convert for loops, move nexusCats --- src/categoriesdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/categoriesdialog.cpp') diff --git a/src/categoriesdialog.cpp b/src/categoriesdialog.cpp index b770fa0b..21523e85 100644 --- a/src/categoriesdialog.cpp +++ b/src/categoriesdialog.cpp @@ -234,7 +234,7 @@ void CategoriesDialog::fillTable() table->setItem(row, 3, nexusCatItem.take()); } - for (auto nexusCat : categories.m_NexusMap) { + for (const auto& nexusCat : categories.m_NexusMap) { QScopedPointer nexusItem(new QListWidgetItem()); nexusItem->setData(Qt::DisplayRole, nexusCat.second.name()); nexusItem->setData(Qt::UserRole, nexusCat.second.ID()); @@ -355,7 +355,7 @@ void CategoriesDialog::nxmGameInfoAvailable(QString gameName, QVariant, CategoryFactory& catFactory = CategoryFactory::instance(); QListWidget* list = ui->nexusCategoryList; list->clear(); - for (auto category : categories) { + for (const auto& category : categories) { auto catMap = category.toMap(); QScopedPointer nexusItem(new QListWidgetItem()); nexusItem->setData(Qt::DisplayRole, catMap["name"].toString()); -- cgit v1.3.1