Skip to content

Commit

Permalink
Fix cppcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Dec 17, 2023
1 parent 07f0ace commit 8f252c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/featurehistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ QMap<QString, FeatureHistory::FeatureModifications> FeatureHistory::reverseModif
continue;
}

QString displayString;
FeatureModifications modifications = modificationsByLayerId.value( layerId );
FeatureModifications reversedModifications;

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 8f252c9

Please sign in to comment.