Skip to content

Commit 566dd4b

Browse files
committedDec 30, 2015
Always pass QgsFeatureId by value, not reference
Since it's just a int64, it's faster to pass by value
1 parent 34c9daa commit 566dd4b

39 files changed

+62
-62
lines changed
 

‎python/core/qgsvectorlayer.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ class QgsVectorLayer : QgsMapLayer
14441444
*
14451445
* @see select(QgsFeatureIds)
14461446
*/
1447-
void select( const QgsFeatureId &featureId );
1447+
void select( QgsFeatureId featureId );
14481448

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

16661666
protected:
16671667
/** Set the extent */

‎python/core/qgsvectorlayercache.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class QgsVectorLayerCache : QObject
179179
* @brief Is emitted when an attribute is changed. Is re-emitted after the layer itself emits this signal.
180180
* You should connect to this signal, to be sure, to not get a cached value if querying the cache.
181181
*/
182-
void attributeValueChanged( const QgsFeatureId& fid, const int& field, const QVariant &value );
182+
void attributeValueChanged( QgsFeatureId fid, const int& field, const QVariant &value );
183183

184184
/**
185185
* Is emitted, when a new feature has been added to the layer and this cache.

‎src/app/nodetool/qgsmaptoolnodetool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void QgsMapToolNodeTool::canvasMoveEvent( QgsMapMouseEvent* e )
165165
double deltaX = curPos.x() - pressPos.x();
166166
double deltaY = curPos.y() - pressPos.y();
167167

168-
Q_FOREACH ( const QgsFeatureId& fid, mMoveRubberBands.keys() )
168+
Q_FOREACH ( QgsFeatureId fid, mMoveRubberBands.keys() )
169169
{
170170
typedef QPair<QgsVertexId, QgsPointV2> MoveVertex;
171171
Q_FOREACH ( const MoveVertex& pair, mMoveVertices[fid] )

‎src/app/qgsmaptoollabel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ int QgsMapToolLabel::dataDefinedColumnIndex( QgsPalLayerSettings::DataDefinedPro
458458
return -1;
459459
}
460460

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

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

552-
bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, int& show, bool& showSuccess, int& showCol ) const
552+
bool QgsMapToolLabel::dataDefinedShowHide( QgsVectorLayer* vlayer, QgsFeatureId featureId, int& show, bool& showSuccess, int& showCol ) const
553553
{
554554
showSuccess = false;
555555
if ( !vlayer )

‎src/app/qgsmaptoollabel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapTool
128128
@param xCol out: index of the x position column
129129
@param yCol out: index of the y position column
130130
@return false if layer does not have data defined label position enabled*/
131-
bool dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeatureId &featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;
131+
bool dataDefinedPosition( QgsVectorLayer* vlayer, QgsFeatureId featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;
132132

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

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

153153
private:
154154
QgsPalLayerSettings mInvalidLabelSettings;

‎src/app/qgsmaptoolshowhidelabels.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void QgsMapToolShowHideLabels::showHideLabels( QMouseEvent * e )
152152
QString editTxt = doHide ? tr( "Hid labels" ) : tr( "Showed labels" );
153153

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

263263
bool QgsMapToolShowHideLabels::showHideLabel( QgsVectorLayer* vlayer,
264-
const QgsFeatureId &fid,
264+
QgsFeatureId fid,
265265
bool hide )
266266
{
267267

‎src/app/qgsmaptoolshowhidelabels.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class APP_EXPORT QgsMapToolShowHideLabels : public QgsMapToolLabel
6666

6767
//! Show or hide chosen label by setting data defined Show Label to 0
6868
bool showHideLabel( QgsVectorLayer* vlayer,
69-
const QgsFeatureId &fid,
69+
QgsFeatureId fid,
7070
bool hide );
7171
};
7272

‎src/core/pal/pointset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ namespace pal
359359

360360
void PointSet::splitPolygons( QLinkedList<PointSet*> &shapes_toProcess,
361361
QLinkedList<PointSet*> &shapes_final,
362-
double xrm, double yrm, const QgsFeatureId& uid )
362+
double xrm, double yrm, QgsFeatureId uid )
363363
{
364364
#ifdef _DEBUG_
365365
std::cout << "splitPolygons: " << uid << std::endl;

‎src/core/pal/pointset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace pal
9898
*/
9999
static void splitPolygons( QLinkedList<PointSet *> &shapes_toProcess,
100100
QLinkedList<PointSet *> &shapes_final,
101-
double xrm, double yrm, const QgsFeatureId &uid );
101+
double xrm, double yrm, QgsFeatureId uid );
102102

103103
/** Returns the squared minimum distance between the point set geometry and the point (px,py)
104104
* Optionally, the nearest point is stored in (rx,ry).

‎src/core/qgsfeaturerequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class CORE_EXPORT QgsFeatureRequest
258258
//! Set feature ID that should be fetched.
259259
QgsFeatureRequest& setFilterFid( QgsFeatureId fid );
260260
//! Get the feature ID that should be fetched.
261-
const QgsFeatureId& filterFid() const { return mFilterFid; }
261+
QgsFeatureId filterFid() const { return mFilterFid; }
262262

263263
//! Set feature IDs that should be fetched.
264264
QgsFeatureRequest& setFilterFids( const QgsFeatureIds& fids );

‎src/core/qgsvectorlayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void QgsVectorLayer::drawVertexMarker( double x, double y, QPainter& p, QgsVecto
409409
}
410410
}
411411

412-
void QgsVectorLayer::select( const QgsFeatureId& fid )
412+
void QgsVectorLayer::select( QgsFeatureId fid )
413413
{
414414
mSelectedFeatureIds.insert( fid );
415415

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

3687-
void QgsVectorLayer::onFeatureDeleted( const QgsFeatureId& fid )
3687+
void QgsVectorLayer::onFeatureDeleted( QgsFeatureId fid )
36883688
{
36893689
if ( mEditCommandActive )
36903690
mDeletedFids << fid;

‎src/core/qgsvectorlayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
16211621
*
16221622
* @see select(QgsFeatureIds)
16231623
*/
1624-
void select( const QgsFeatureId &featureId );
1624+
void select( QgsFeatureId featureId );
16251625

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

18391839
private slots:
18401840
void onJoinedFieldsChanged();
1841-
void onFeatureDeleted( const QgsFeatureId& fid );
1841+
void onFeatureDeleted( QgsFeatureId fid );
18421842

18431843
protected:
18441844
/** Set the extent */

‎src/core/qgsvectorlayercache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject
245245
* @brief Is emitted when an attribute is changed. Is re-emitted after the layer itself emits this signal.
246246
* You should connect to this signal, to be sure, to not get a cached value if querying the cache.
247247
*/
248-
void attributeValueChanged( const QgsFeatureId& fid, const int& field, const QVariant &value );
248+
void attributeValueChanged( QgsFeatureId fid, const int& field, const QVariant &value );
249249

250250
/**
251251
* Is emitted, when a new feature has been added to the layer and this cache.

‎src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
void QgsGeometryAngleCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1212
{
1313
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
14-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
14+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1515
{
1616
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1717
QgsFeature feature;

‎src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
void QgsGeometryAreaCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1414
{
1515
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
16-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
16+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1717
{
1818
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1919
QgsFeature feature;
@@ -121,7 +121,7 @@ bool QgsGeometryAreaCheck::mergeWithNeighbor( QgsFeature& feature, int partIdx,
121121
QgsAbstractGeometryV2* geom = feature.geometry()->geometry();
122122

123123
// Search for touching neighboring geometries
124-
Q_FOREACH ( const QgsFeatureId& testId, mFeaturePool->getIntersects( feature.geometry()->boundingBox() ) )
124+
Q_FOREACH ( QgsFeatureId testId, mFeaturePool->getIntersects( feature.geometry()->boundingBox() ) )
125125
{
126126
QgsFeature testFeature;
127127
if ( !mFeaturePool->get( testId, testFeature ) )

‎src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ double QgsGeometryCheckPrecision::reducedTolerance()
4949
}
5050

5151
QgsGeometryCheckError::QgsGeometryCheckError( const QgsGeometryCheck* check,
52-
const QgsFeatureId& featureId,
52+
QgsFeatureId featureId,
5353
const QgsPointV2& errorLocation,
5454
const QgsVertexId& vidx,
5555
const QVariant& value , ValueType valueType )

‎src/plugins/geometry_checker/checks/qgsgeometrycheck.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ class QgsGeometryCheckError
8787
enum ValueType { ValueLength, ValueArea, ValueOther };
8888

8989
QgsGeometryCheckError( const QgsGeometryCheck* check,
90-
const QgsFeatureId& featureId,
90+
QgsFeatureId featureId,
9191
const QgsPointV2& errorLocation,
9292
const QgsVertexId& vidx = QgsVertexId(),
9393
const QVariant& value = QVariant(),
9494
ValueType valueType = ValueOther );
9595
virtual ~QgsGeometryCheckError();
9696
const QgsGeometryCheck* check() const { return mCheck; }
97-
const QgsFeatureId& featureId() const { return mFeatureId; }
97+
QgsFeatureId featureId() const { return mFeatureId; }
9898
virtual QgsAbstractGeometryV2* geometry();
9999
virtual QgsRectangle affectedAreaBBox() { return geometry() ? geometry()->boundingBox() : QgsRectangle(); }
100100
virtual QString description() const { return mCheck->errorDescription(); }

‎src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1313
{
1414
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
15-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
15+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1616
{
1717
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1818
QgsFeature feature;
@@ -24,7 +24,7 @@ void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError*>& er
2424
QgsGeometryEngine* geomEngine = QgsGeomUtils::createGeomEngine( feature.geometry()->geometry(), QgsGeometryCheckPrecision::tolerance() );
2525

2626
QgsFeatureIds ids = mFeaturePool->getIntersects( feature.geometry()->geometry()->boundingBox() );
27-
Q_FOREACH ( const QgsFeatureId& otherid, ids )
27+
Q_FOREACH ( QgsFeatureId otherid, ids )
2828
{
2929
if ( otherid == featureid )
3030
{

‎src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class QgsGeometryContainedCheckError : public QgsGeometryCheckError
1414
{
1515
public:
1616
QgsGeometryContainedCheckError( const QgsGeometryCheck* check,
17-
const QgsFeatureId& featureId,
17+
QgsFeatureId featureId,
1818
const QgsPointV2& errorLocation,
19-
const QgsFeatureId& otherId
19+
QgsFeatureId otherId
2020
)
2121
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), otherId, ValueOther ), mOtherId( otherId ) { }
22-
const QgsFeatureId& otherId() const { return mOtherId; }
22+
QgsFeatureId otherId() const { return mOtherId; }
2323

2424
bool isEqual( QgsGeometryCheckError* other ) const override
2525
{

‎src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
void QgsGeometryDegeneratePolygonCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1212
{
1313
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
14-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
14+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1515
{
1616
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1717
QgsFeature feature;

‎src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
void QgsGeometryDuplicateCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1515
{
1616
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
17-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
17+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1818
{
1919
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
2020
QgsFeature feature;
@@ -26,7 +26,7 @@ void QgsGeometryDuplicateCheck::collectErrors( QList<QgsGeometryCheckError*>& er
2626

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

7979
QgsGeometryDuplicateCheckError* duplicateError = static_cast<QgsGeometryDuplicateCheckError*>( error );
80-
Q_FOREACH ( const QgsFeatureId& id, duplicateError->duplicates() )
80+
Q_FOREACH ( QgsFeatureId id, duplicateError->duplicates() )
8181
{
8282
QgsFeature testFeature;
8383
if ( !mFeaturePool->get( id, testFeature ) )

‎src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class QgsGeometryDuplicateCheckError : public QgsGeometryCheckError
1414
{
1515
public:
1616
QgsGeometryDuplicateCheckError( const QgsGeometryCheck* check,
17-
const QgsFeatureId& featureId,
17+
QgsFeatureId featureId,
1818
const QgsPointV2& errorLocation,
1919
const QList<QgsFeatureId>& duplicates )
2020
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), duplicatesString( duplicates ) ), mDuplicates( duplicates ) { }

‎src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
void QgsGeometryDuplicateNodesCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1313
{
1414
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
15-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
15+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1616
{
1717
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1818
QgsFeature feature;

‎src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void QgsGeometryGapCheck::collectErrors( QList<QgsGeometryCheckError*>& errors,
1919
// Collect geometries, build spatial index
2020
QList<const QgsAbstractGeometryV2*> geomList;
2121
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
22-
Q_FOREACH ( const QgsFeatureId& id, featureIds )
22+
Q_FOREACH ( QgsFeatureId id, featureIds )
2323
{
2424
QgsFeature feature;
2525
if ( mFeaturePool->get( id, feature ) )
@@ -159,7 +159,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError* err, Chan
159159
QgsAbstractGeometryV2* errGeometry = QgsGeomUtils::getGeomPart( err->geometry(), 0 );
160160

161161
// Search for touching neighboring geometries
162-
Q_FOREACH ( const QgsFeatureId& testId, err->neighbors() )
162+
Q_FOREACH ( QgsFeatureId testId, err->neighbors() )
163163
{
164164
QgsFeature testFeature;
165165
if ( !mFeaturePool->get( testId, testFeature ) )

‎src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
void QgsGeometryHoleCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1212
{
1313
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
14-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
14+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1515
{
1616
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1717
QgsFeature feature;

‎src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
void QgsGeometryMultipartCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &/*messages*/, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1212
{
1313
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
14-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
14+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1515
{
1616
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1717
QgsFeature feature;

‎src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError*>& errors, QStringList &messages, QAtomicInt* progressCounter , const QgsFeatureIds &ids ) const
1313
{
1414
const QgsFeatureIds& featureIds = ids.isEmpty() ? mFeaturePool->getFeatureIds() : ids;
15-
Q_FOREACH ( const QgsFeatureId& featureid, featureIds )
15+
Q_FOREACH ( QgsFeatureId featureid, featureIds )
1616
{
1717
if ( progressCounter ) progressCounter->fetchAndAddRelaxed( 1 );
1818
QgsFeature feature;
@@ -24,7 +24,7 @@ void QgsGeometryOverlapCheck::collectErrors( QList<QgsGeometryCheckError*>& erro
2424
QgsGeometryEngine* geomEngine = QgsGeomUtils::createGeomEngine( geom, QgsGeometryCheckPrecision::tolerance() );
2525

2626
QgsFeatureIds ids = mFeaturePool->getIntersects( feature.geometry()->boundingBox() );
27-
Q_FOREACH ( const QgsFeatureId& otherid, ids )
27+
Q_FOREACH ( QgsFeatureId otherid, ids )
2828
{
2929
// >= : only report overlaps once
3030
if ( otherid >= featureid )

‎src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class QgsGeometryOverlapCheckError : public QgsGeometryCheckError
1414
{
1515
public:
1616
QgsGeometryOverlapCheckError( const QgsGeometryCheck* check,
17-
const QgsFeatureId& featureId,
17+
QgsFeatureId featureId,
1818
const QgsPointV2& errorLocation,
1919
const QVariant& value,
20-
const QgsFeatureId& otherId )
20+
QgsFeatureId otherId )
2121
: QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), value, ValueArea ), mOtherId( otherId ) { }
22-
const QgsFeatureId& otherId() const { return mOtherId; }
22+
QgsFeatureId otherId() const { return mOtherId; }
2323

2424
bool isEqual( QgsGeometryCheckError* other ) const override
2525
{

0 commit comments

Comments
 (0)
Please sign in to comment.