Skip to content
Permalink
Browse files

Always pass QgsFeatureId by value, not reference

Since it's just a int64, it's faster to pass by value
  • Loading branch information
nyalldawson committed Dec 30, 2015
1 parent 34c9daa commit 566dd4bd43e66a65b97a2f26f09be2c2925c743f
Showing with 62 additions and 62 deletions.
  1. +2 −2 python/core/qgsvectorlayer.sip
  2. +1 −1 python/core/qgsvectorlayercache.sip
  3. +1 −1 src/app/nodetool/qgsmaptoolnodetool.cpp
  4. +3 −3 src/app/qgsmaptoollabel.cpp
  5. +3 −3 src/app/qgsmaptoollabel.h
  6. +2 −2 src/app/qgsmaptoolshowhidelabels.cpp
  7. +1 −1 src/app/qgsmaptoolshowhidelabels.h
  8. +1 −1 src/core/pal/pointset.cpp
  9. +1 −1 src/core/pal/pointset.h
  10. +1 −1 src/core/qgsfeaturerequest.h
  11. +2 −2 src/core/qgsvectorlayer.cpp
  12. +2 −2 src/core/qgsvectorlayer.h
  13. +1 −1 src/core/qgsvectorlayercache.h
  14. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp
  15. +2 −2 src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp
  16. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp
  17. +2 −2 src/plugins/geometry_checker/checks/qgsgeometrycheck.h
  18. +2 −2 src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp
  19. +3 −3 src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h
  20. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp
  21. +3 −3 src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp
  22. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h
  23. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp
  24. +2 −2 src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp
  25. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp
  26. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp
  27. +2 −2 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp
  28. +3 −3 src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h
  29. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp
  30. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp
  31. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h
  32. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp
  33. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h
  34. +1 −1 src/plugins/geometry_checker/qgsgeometrychecker.cpp
  35. +1 −1 src/plugins/geometry_checker/utils/qgsfeaturepool.cpp
  36. +1 −1 src/plugins/geometry_checker/utils/qgsfeaturepool.h
  37. +3 −3 src/plugins/geometry_snapper/qgsgeometrysnapper.cpp
  38. +3 −3 src/plugins/geometry_snapper/qgsgeometrysnapper.h
  39. +1 −1 src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp
@@ -1444,7 +1444,7 @@ class QgsVectorLayer : QgsMapLayer
*
* @see select(QgsFeatureIds)
*/
void select( const QgsFeatureId &featureId );
void select( QgsFeatureId featureId );

/**
* Select features by their ID
@@ -1661,7 +1661,7 @@ class QgsVectorLayer : QgsMapLayer
private slots:
void onRelationsLoaded();
void onJoinedFieldsChanged();
void onFeatureDeleted( const QgsFeatureId& fid );
void onFeatureDeleted( QgsFeatureId fid );

protected:
/** Set the extent */
@@ -179,7 +179,7 @@ class QgsVectorLayerCache : QObject
* @brief Is emitted when an attribute is changed. Is re-emitted after the layer itself emits this signal.
* You should connect to this signal, to be sure, to not get a cached value if querying the cache.
*/
void attributeValueChanged( const QgsFeatureId& fid, const int& field, const QVariant &value );
void attributeValueChanged( QgsFeatureId fid, const int& field, const QVariant &value );

/**
* Is emitted, when a new feature has been added to the layer and this cache.
@@ -165,7 +165,7 @@ void QgsMapToolNodeTool::canvasMoveEvent( QgsMapMouseEvent* e )
double deltaX = curPos.x() - pressPos.x();
double deltaY = curPos.y() - pressPos.y();

Q_FOREACH ( const QgsFeatureId& fid, mMoveRubberBands.keys() )
Q_FOREACH ( QgsFeatureId fid, mMoveRubberBands.keys() )
{
typedef QPair<QgsVertexId, QgsPointV2> MoveVertex;
Q_FOREACH ( const MoveVertex& pair, mMoveVertices[fid] )
@@ -458,7 +458,7 @@ int QgsMapToolLabel::dataDefinedColumnIndex( QgsPalLayerSettings::DataDefinedPro
return -1;
}

bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const
bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, QgsFeatureId featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const
{
xSuccess = false;
ySuccess = false;
@@ -513,7 +513,7 @@ bool QgsMapToolLabel::layerIsRotatable( QgsMapLayer* layer, int& rotationCol ) c
return false;
}

bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& rotation, bool& rotationSuccess, bool ignoreXY ) const
bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, QgsFeatureId featureId, double& rotation, bool& rotationSuccess, bool ignoreXY ) const
{
rotationSuccess = false;
if ( !vlayer )
@@ -549,7 +549,7 @@ bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, const QgsFeat
return true;
}

bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, int& show, bool& showSuccess, int& showCol ) const
bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, QgsFeatureId featureId, int& show, bool& showSuccess, int& showCol ) const
{
showSuccess = false;
if ( !vlayer )
@@ -128,7 +128,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
@param xCol out: index of the x position column
@param yCol out: index of the y position column
@return false if layer does not have data defined label position enabled*/
bool dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;
bool dataDefinedPosition( QgsVectorLayer* vlayer, QgsFeatureId featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;

/** Returns data defined rotation of a feature.
@param vlayer vector layer
@@ -138,7 +138,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
@param ignoreXY ignore that x and y are required to be data-defined
@return true if data defined rotation is enabled on the layer
*/
bool dataDefinedRotation( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& rotation, bool& rotationSuccess, bool ignoreXY = false ) const;
bool dataDefinedRotation( QgsVectorLayer* vlayer, QgsFeatureId featureId, double& rotation, bool& rotationSuccess, bool ignoreXY = false ) const;

/** Returns data defined show/hide of a feature.
@param vlayer vector layer
@@ -148,7 +148,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
@param showCol out: index of the show label column
@return true if data defined show/hide is enabled on the layer
*/
bool dataDefinedShowHide( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, int& show, bool& showSuccess, int& showCol ) const;
bool dataDefinedShowHide( QgsVectorLayer* vlayer, QgsFeatureId featureId, int& show, bool& showSuccess, int& showCol ) const;

private:
QgsPalLayerSettings mInvalidLabelSettings;
@@ -152,7 +152,7 @@ void QgsMapToolShowHideLabels::showHideLabels( QMouseEvent * e )
QString editTxt = doHide ? tr( "Hid labels" ) : tr( "Showed labels" );

vlayer->beginEditCommand( editTxt );
Q_FOREACH ( const QgsFeatureId &fid, selectedFeatIds )
Q_FOREACH ( QgsFeatureId fid, selectedFeatIds )
{
if ( showHideLabel( vlayer, fid, doHide ) )
{
@@ -261,7 +261,7 @@ bool QgsMapToolShowHideLabels::selectedLabelFeatures( QgsVectorLayer* vlayer,
}

bool QgsMapToolShowHideLabels::showHideLabel( QgsVectorLayer* vlayer,
const QgsFeatureId &fid,
QgsFeatureId fid,
bool hide )
{

@@ -66,7 +66,7 @@ class APP_EXPORT QgsMapToolShowHideLabels : public QgsMapToolLabel

//! Show or hide chosen label by setting data defined Show Label to 0
bool showHideLabel( QgsVectorLayer* vlayer,
const QgsFeatureId &fid,
QgsFeatureId fid,
bool hide );
};

@@ -359,7 +359,7 @@ namespace pal

void PointSet::splitPolygons( QLinkedList<PointSet*> &shapes_toProcess,
QLinkedList<PointSet*> &shapes_final,
double xrm, double yrm, const QgsFeatureId& uid )
double xrm, double yrm, QgsFeatureId uid )
{
#ifdef _DEBUG_
std::cout << "splitPolygons: " << uid << std::endl;
@@ -98,7 +98,7 @@ namespace pal
*/
static void splitPolygons( QLinkedList<PointSet *> &shapes_toProcess,
QLinkedList<PointSet *> &shapes_final,
double xrm, double yrm, const QgsFeatureId &uid );
double xrm, double yrm, QgsFeatureId uid );

/** Returns the squared minimum distance between the point set geometry and the point (px,py)
* Optionally, the nearest point is stored in (rx,ry).
@@ -258,7 +258,7 @@ class CORE_EXPORT QgsFeatureRequest
//! Set feature ID that should be fetched.
QgsFeatureRequest& setFilterFid( QgsFeatureId fid );
//! Get the feature ID that should be fetched.
const QgsFeatureId& filterFid() const { return mFilterFid; }
QgsFeatureId filterFid() const { return mFilterFid; }

//! Set feature IDs that should be fetched.
QgsFeatureRequest& setFilterFids( const QgsFeatureIds& fids );
@@ -409,7 +409,7 @@ void QgsVectorLayer::drawVertexMarker( double x, double y, QPainter& p, QgsVecto
}
}

void QgsVectorLayer::select( const QgsFeatureId& fid )
void QgsVectorLayer::select( QgsFeatureId fid )
{
mSelectedFeatureIds.insert( fid );

@@ -3684,7 +3684,7 @@ void QgsVectorLayer::onJoinedFieldsChanged()
updateFields();
}

void QgsVectorLayer::onFeatureDeleted( const QgsFeatureId& fid )
void QgsVectorLayer::onFeatureDeleted( QgsFeatureId fid )
{
if ( mEditCommandActive )
mDeletedFids << fid;
@@ -1621,7 +1621,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
*
* @see select(QgsFeatureIds)
*/
void select( const QgsFeatureId &featureId );
void select( QgsFeatureId featureId );

/**
* Select features by their ID
@@ -1838,7 +1838,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer

private slots:
void onJoinedFieldsChanged();
void onFeatureDeleted( const QgsFeatureId& fid );
void onFeatureDeleted( QgsFeatureId fid );

protected:
/** Set the extent */
@@ -245,7 +245,7 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject
* @brief Is emitted when an attribute is changed. Is re-emitted after the layer itself emits this signal.
* You should connect to this signal, to be sure, to not get a cached value if querying the cache.
*/
void attributeValueChanged( const QgsFeatureId& fid, const int& field, const QVariant &value );
void attributeValueChanged( QgsFeatureId fid, const int& field, const QVariant &value );

/**
* Is emitted, when a new feature has been added to the layer and this cache.
@@ -11,7 +11,7 @@
void QgsGeometryAngleCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -13,7 +13,7 @@
void QgsGeometryAreaCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -121,7 +121,7 @@ bool QgsGeometryAreaCheck::mergeWithNeighbor( QgsFeature& feature, int partIdx,
QgsAbstractGeometryV2* geom = feature.geometry()->geometry();

// Search for touching neighboring geometries
Q_FOREACH ( const QgsFeatureId& testId, mFeaturePool->getIntersects( feature.geometry()->boundingBox() ) )
Q_FOREACH ( QgsFeatureId testId, mFeaturePool->getIntersects( feature.geometry()->boundingBox() ) )
{
QgsFeature testFeature;
if ( !mFeaturePool->get( testId, testFeature ) )
@@ -49,7 +49,7 @@ double QgsGeometryCheckPrecision::reducedTolerance()
}

QgsGeometryCheckError::QgsGeometryCheckError( const QgsGeometryCheck* check,
const QgsFeatureId& featureId,
QgsFeatureId featureId,
const QgsPointV2& errorLocation,
const QgsVertexId& vidx,
const QVariant& value , ValueType valueType )
@@ -87,14 +87,14 @@ class QgsGeometryCheckError
enum ValueType { ValueLength, ValueArea, ValueOther };

QgsGeometryCheckError( const QgsGeometryCheck* check,
const QgsFeatureId& featureId,
QgsFeatureId featureId,
const QgsPointV2& errorLocation,
const QgsVertexId& vidx = QgsVertexId(),
const QVariant& value = QVariant(),
ValueType valueType = ValueOther );
virtual ~QgsGeometryCheckError();
const QgsGeometryCheck* check() const { return mCheck; }
const QgsFeatureId& featureId() const { return mFeatureId; }
QgsFeatureId featureId() const { return mFeatureId; }
virtual QgsAbstractGeometryV2* geometry();
virtual QgsRectangle affectedAreaBBox() { return geometry() ? geometry()->boundingBox() : QgsRectangle(); }
virtual QString description() const { return mCheck->errorDescription(); }
@@ -12,7 +12,7 @@
void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -24,7 +24,7 @@ void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError*>& er
QgsGeometryEngine* geomEngine = QgsGeomUtils::createGeomEngine( feature.geometry()->geometry(), QgsGeometryCheckPrecision::tolerance() );

QgsFeatureIds ids = mFeaturePool->getIntersects( feature.geometry()->geometry()->boundingBox() );
Q_FOREACH ( const QgsFeatureId& otherid, ids )
Q_FOREACH ( QgsFeatureId otherid, ids )
{
if ( otherid == featureid )
{
@@ -14,12 +14,12 @@ class QgsGeometryContainedCheckError : public QgsGeometryCheckError
{
public:
QgsGeometryContainedCheckError( const QgsGeometryCheck* check,
const QgsFeatureId& featureId,
QgsFeatureId featureId,
const QgsPointV2& errorLocation,
const QgsFeatureId& otherId
QgsFeatureId otherId
)
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), otherId, ValueOther ), mOtherId( otherId ) { }
const QgsFeatureId& otherId() const { return mOtherId; }
QgsFeatureId otherId() const { return mOtherId; }

bool isEqual( QgsGeometryCheckError* other ) const override
{
@@ -11,7 +11,7 @@
void QgsGeometryDegeneratePolygonCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -14,7 +14,7 @@
void QgsGeometryDuplicateCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -26,7 +26,7 @@ void QgsGeometryDuplicateCheck::collectErrors( QList<QgsGeometryCheckError*>& er

QList<QgsFeatureId> duplicates;
QgsFeatureIds ids = mFeaturePool->getIntersects( feature.geometry()->geometry()->boundingBox() );
Q_FOREACH ( const QgsFeatureId& id, ids )
Q_FOREACH ( QgsFeatureId id, ids )
{
// > : only report overlaps once
if ( id >= featureid )
@@ -77,7 +77,7 @@ void QgsGeometryDuplicateCheck::fixError( QgsGeometryCheckError* error, int meth
QgsGeometryEngine* geomEngine = QgsGeomUtils::createGeomEngine( feature.geometry()->geometry(), QgsGeometryCheckPrecision::tolerance() );

QgsGeometryDuplicateCheckError* duplicateError = static_cast<QgsGeometryDuplicateCheckError*>( error );
Q_FOREACH ( const QgsFeatureId& id, duplicateError->duplicates() )
Q_FOREACH ( QgsFeatureId id, duplicateError->duplicates() )
{
QgsFeature testFeature;
if ( !mFeaturePool->get( id, testFeature ) )
@@ -14,7 +14,7 @@ class QgsGeometryDuplicateCheckError : public QgsGeometryCheckError
{
public:
QgsGeometryDuplicateCheckError( const QgsGeometryCheck* check,
const QgsFeatureId& featureId,
QgsFeatureId featureId,
const QgsPointV2& errorLocation,
const QList<QgsFeatureId>& duplicates )
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), duplicatesString( duplicates ) ), mDuplicates( duplicates ) { }
@@ -12,7 +12,7 @@
void QgsGeometryDuplicateNodesCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -19,7 +19,7 @@ void QgsGeometryGapCheck::collectErrors( QList<QgsGeometryCheckError*>& errors,
// Collect geometries, build spatial index
QList<const QgsAbstractGeometryV2*> geomList;
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& id, featureIds )
Q_FOREACH ( QgsFeatureId id, featureIds )
{
QgsFeature feature;
if ( mFeaturePool->get( id, feature ) )
@@ -159,7 +159,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError* err, Chan
QgsAbstractGeometryV2* errGeometry = QgsGeomUtils::getGeomPart( err->geometry(), 0 );

// Search for touching neighboring geometries
Q_FOREACH ( const QgsFeatureId& testId, err->neighbors() )
Q_FOREACH ( QgsFeatureId testId, err->neighbors() )
{
QgsFeature testFeature;
if ( !mFeaturePool->get( testId, testFeature ) )
@@ -11,7 +11,7 @@
void QgsGeometryHoleCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -11,7 +11,7 @@
void QgsGeometryMultipartCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -12,7 +12,7 @@
void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
{
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
Q_FOREACH ( QgsFeatureId featureid, featureIds )
{
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
QgsFeature feature;
@@ -24,7 +24,7 @@ void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError*>& erro
QgsGeometryEngine* geomEngine = QgsGeomUtils::createGeomEngine( geom, QgsGeometryCheckPrecision::tolerance() );

QgsFeatureIds ids = mFeaturePool->getIntersects( feature.geometry()->boundingBox() );
Q_FOREACH ( const QgsFeatureId& otherid, ids )
Q_FOREACH ( QgsFeatureId otherid, ids )
{
// >= : only report overlaps once
if ( otherid >= featureid )
@@ -14,12 +14,12 @@ class QgsGeometryOverlapCheckError : public QgsGeometryCheckError
{
public:
QgsGeometryOverlapCheckError( const QgsGeometryCheck* check,
const QgsFeatureId& featureId,
QgsFeatureId featureId,
const QgsPointV2& errorLocation,
const QVariant& value,
const QgsFeatureId& otherId )
QgsFeatureId otherId )
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), value, ValueArea ), mOtherId( otherId ) { }
const QgsFeatureId& otherId() const { return mOtherId; }
QgsFeatureId otherId() const { return mOtherId; }

bool isEqual( QgsGeometryCheckError* other ) const override
{

0 comments on commit 566dd4b

Please sign in to comment.
You can’t perform that action at this time.