Skip to content
Permalink
Browse files
make cppcheck happy
  • Loading branch information
elpaso committed Apr 7, 2021
1 parent fd75ba5 commit ca080a0bcb9fa82eaedc0ea7509c9c75aa96405a
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/vector/qgsvectorlayerundopassthroughcommand.cpp
@@ -567,11 +567,10 @@ QgsVectorLayerUndoPassthroughCommandChangeAttributes::QgsVectorLayerUndoPassthro
mOldValues[ it.key() ] = oldAttrs[ it.key() ];
}
}
QgsFeatureMap::const_iterator addedIt { mBuffer->mAddedFeatures.constFind( mFid ) };
const bool isAdded { addedIt != mBuffer->mAddedFeatures.constEnd() };
const bool isAdded { mBuffer->mAddedFeatures.contains( mFid ) };
for ( auto it = mNewValues.constBegin(); it != mNewValues.constEnd(); ++it )
{
if ( isAdded && addedIt.value().attribute( it.key() ).isValid() )
if ( isAdded && mBuffer->mAddedFeatures[ mFid ].attribute( it.key() ).isValid() )
{
mFirstChanges[ it.key() ] = false;
}

0 comments on commit ca080a0

Please sign in to comment.