cpp check result fix Prefer prefix ++/-- operators for non-primitive types

This commit is contained in:
Klaus Basan
2018-03-22 16:18:39 +01:00
parent fba301adcc
commit 4ec3a76ed4
2 changed files with 10 additions and 6 deletions

View File

@@ -33,3 +33,8 @@ passedByValue:src/xswiftbus/command.h
// Unique pointers should be passed by value // Unique pointers should be passed by value
passedByValue:src/xswiftbus/menus.h passedByValue:src/xswiftbus/menus.h
// Suddenly appearing (KB 2018-03) issue here
// src/blackmisc/iterator.h 53 -> 'operator=' should return reference to 'this' instance.
operatorEqRetRefThis:src/blackmisc/iterator.h

View File

@@ -572,12 +572,11 @@ namespace BlackMisc
for (const QString &sourceFile : as_const(comp.sameNameInSource)) for (const QString &sourceFile : as_const(comp.sameNameInSource))
{ {
const QFileInfo source(sourceFile); const QFileInfo source(sourceFile);
const QFileInfo target(*targetIt++); const QFileInfo target(*targetIt);
if (source.lastModified() == target.lastModified() && source.size() == target.size()) ++targetIt; // avoid cpp check warning
{ if (source.lastModified() == target.lastModified() && source.size() == target.size()) { continue; }
// same
} if (source.lastModified() < target.lastModified())
else if (source.lastModified() < target.lastModified())
{ {
comp.newerInTarget.insert(target.canonicalFilePath()); comp.newerInTarget.insert(target.canonicalFilePath());
} }