Fix cppcheck and compiler warnings

This commit is contained in:
Mat Sutcliffe
2020-06-18 23:48:58 +01:00
parent 9309beefc4
commit 670b1a1986
61 changed files with 131 additions and 153 deletions

View File

@@ -495,11 +495,10 @@ namespace BlackMisc
QSet<int> ids;
dir.setFilter(QDir::Files | QDir::NoSymLinks);
dir.setSorting(QDir::Name);
bool ok = false;
for (const QFileInfo &fileInfo : dir.entryInfoList())
{
const QString fn(fileInfo.fileName());
ok = fn.size() > 5;
bool ok = fn.size() > 5;
if (!ok) { continue; }
BLACK_VERIFY_X(ok, Q_FUNC_INFO, "wrong file name");
const int id = fn.leftRef(5).toInt(&ok);