Fix cppcheck warnings

This commit is contained in:
Lars Toenning
2023-04-16 21:02:55 +02:00
parent ac04aa3a63
commit 7ef0e6e1eb
28 changed files with 45 additions and 53 deletions

View File

@@ -1030,14 +1030,11 @@ namespace BlackMisc::Simulation
}
const QMultiMap<int, CSimulatorInfo> cps(counts.countPerSimulator());
CSimulatorInfo maxSim = cps.last();
if (simulatorsRepresented > 0)
const int count = cps.lastKey(); // how many elements
const QList<CSimulatorInfo> infoWithMaxValues = cps.values(count); // all with the same counts
for (const CSimulatorInfo &info : infoWithMaxValues)
{
const int count = cps.lastKey(); // how many elements
const QList<CSimulatorInfo> infoWithMaxValues = cps.values(count); // all with the same counts
for (const CSimulatorInfo &info : infoWithMaxValues)
{
maxSim.addSimulator(info);
}
maxSim.addSimulator(info);
}
return maxSim;
}

View File

@@ -148,7 +148,7 @@ namespace BlackMisc::Simulation::FsCommon
if (m_shutdown) { return false; }
loadedFiles++;
bool s = this->loadFile(fn, rules);
if (!s) { this->m_fileListWithProblems.append(fn); }
if (!s) { filesWithProblems.append(fn); }
}
{