From cdc16dfbb2b41f4ede8c471658819d4b6132fcf0 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sun, 24 Sep 2023 14:36:52 -0500 Subject: Use c++11 for loop --- src/categoriesdialog.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/categoriesdialog.cpp') 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::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) { -- cgit v1.3.1