apply some code analyzer recommendations

This commit is contained in:
2024-11-20 20:01:58 +03:00
parent b65bf5e640
commit a3e88f792d
8 changed files with 24 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ using namespace CDUtils;
QStringList CDUtils::getList(const PIVector<PIDeque<int>> & x_list) {
QStringList ret;
piForeachC(PIDeque<int> & p, x_list)
for (const auto & p: x_list)
ret << PI2QString(CDCore::pathToString(p));
return ret;
}
@@ -29,7 +29,7 @@ QStringList CDUtils::getList(const PIVector<PIDeque<int>> & x_list) {
PIVector<PIDeque<int>> CDUtils::setList(const QStringList & l) {
PIVector<PIDeque<int>> ret;
foreach(QString s, l)
for (const auto & s: l)
ret << CDCore::stringToPath(Q2PIString(s));
return ret;
}
@@ -294,7 +294,7 @@ void CDGraphics::receivedX() {
X.lock();
PIVector<PIDeque<int>> x_list = X.enabledList();
PIVector<double> ch;
piForeachC(PIDeque<int> & p, x_list) {
for (const auto & p: x_list) {
CDType & t(X[p]);
if (t.xmode_rec() == CDType::X_Current)
ch.resize(1).fill(t.toDouble());

View File

@@ -91,7 +91,7 @@ void CDPultWindow::apply(bool sessions) {
X.lock();
PIVector<PIDeque<int>> x_list = X.enabledList();
X.unlock();
piForeachC(PIDeque<int> & p, x_list)
for (const auto & p: x_list)
X.enable(X[p]);
((CDItemModel *)widgetX->view->model())->updateModel();
widgetX->view->expandAll();