From 8f252c904d54b228823f1bc148b48d15e1b88d7a Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Sun, 17 Dec 2023 19:08:16 +0200 Subject: [PATCH] Fix cppcheck warnings --- src/core/featurehistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/featurehistory.cpp b/src/core/featurehistory.cpp index df8bbbedf9..550bf60e86 100644 --- a/src/core/featurehistory.cpp +++ b/src/core/featurehistory.cpp @@ -220,7 +220,6 @@ QMap FeatureHistory::reverseModif continue; } - QString displayString; FeatureModifications modifications = modificationsByLayerId.value( layerId ); FeatureModifications reversedModifications; @@ -399,6 +398,7 @@ const QString FeatureHistory::undoMessage() for ( const FeatureModifications &modifiedFeatures : modifiedFeaturesByLayerId.values() ) { + // cppcheck-suppress useStlAlgorithm totalChanges += modifiedFeatures.createdFeatures.count() + modifiedFeatures.updatedFeatures.count() + modifiedFeatures.deletedFeatures.count(); @@ -428,6 +428,7 @@ const QString FeatureHistory::redoMessage() for ( const FeatureModifications &modifiedFeatures : modifiedFeaturesByLayerId.values() ) { + // cppcheck-suppress useStlAlgorithm totalChanges += modifiedFeatures.createdFeatures.count() + modifiedFeatures.updatedFeatures.count() + modifiedFeatures.deletedFeatures.count();