summaryrefslogtreecommitdiff
path: root/src/categoriesdialog.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2023-09-24 14:36:52 -0500
committerJeremy Rimpo <jrim@rimpo.org>2023-09-24 14:36:52 -0500
commitcdc16dfbb2b41f4ede8c471658819d4b6132fcf0 (patch)
treebcacbcedbaec7b171a6c2dda1d17f8b6dcbe5bd5 /src/categoriesdialog.cpp
parentc30b5183aeea55290ec9072cac958cd6e90fdf30 (diff)
Use c++11 for loop
Diffstat (limited to 'src/categoriesdialog.cpp')
-rw-r--r--src/categoriesdialog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/categoriesdialog.cpp b/src/categoriesdialog.cpp
index 21523e85..e577eb5f 100644
--- a/src/categoriesdialog.cpp
+++ b/src/categoriesdialog.cpp
@@ -209,10 +209,7 @@ void CategoriesDialog::fillTable()
QRegularExpression("([0-9]+)?(,[0-9]+)*"), this)));
int row = 0;
- for (std::vector<CategoryFactory::Category>::const_iterator iter =
- categories.m_Categories.begin();
- iter != categories.m_Categories.end(); ++iter, ++row) {
- const CategoryFactory::Category& category = *iter;
+ for (const auto& category : categories.m_Categories) {
if (category.ID() == 0) {
--row;
continue;
@@ -232,6 +229,7 @@ void CategoriesDialog::fillTable()
table->setItem(row, 1, nameItem.take());
table->setItem(row, 2, parentIDItem.take());
table->setItem(row, 3, nexusCatItem.take());
+ ++row;
}
for (const auto& nexusCat : categories.m_NexusMap) {