Skip to content

Commit

Permalink
Always pass QgsFeatureId by value, not reference
Browse files Browse the repository at this point in the history
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 566dd4b
Show file tree
Hide file tree
Showing 39 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ class QgsVectorLayer : QgsMapLayer
*
* @see select(QgsFeatureIds)
*/
void select( const QgsFeatureId &featureId );
void select( QgsFeatureId featureId );

/**
* Select features by their ID
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayercache.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/app/nodetool/qgsmaptoolnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] )
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptoollabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptoollabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolshowhidelabels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
{
Expand Down Expand Up @@ -261,7 +261,7 @@ bool QgsMapToolShowHideLabels::selectedLabelFeatures( QgsVectorLayer* vlayer,
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolshowhidelabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/pointset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/pointset.h
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfeaturerequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

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

void QgsVectorLayer::onFeatureDeleted( const QgsFeatureId& fid )
void QgsVectorLayer::onFeatureDeleted( QgsFeatureId fid )
{
if ( mEditCommandActive )
mDeletedFids << fid;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayercache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ) )
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/geometry_checker/checks/qgsgeometrycheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 )
Expand Down Expand Up @@ -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 ) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
Expand Down Expand Up @@ -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 ) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 )
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading