Skip to content

Commit

Permalink
make cppcheck happy
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 7, 2021
1 parent fd75ba5 commit ca080a0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/vector/qgsvectorlayerundopassthroughcommand.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit ca080a0

Please sign in to comment.