mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
[geometry snapper] Use std::as_const when appropriate
This commit is contained in:
parent
e7ff071c56
commit
553bb27bc9
@ -191,7 +191,7 @@ QVariantMap QgsSnapGeometriesAlgorithm::processAlgorithm( const QVariantMap &par
|
||||
// reversed order snapping round is required to insure geometries are snapped against all features
|
||||
snapper = QgsInternalGeometrySnapper( tolerance, mode );
|
||||
std::reverse( editedFeatureIds.begin(), editedFeatureIds.end() );
|
||||
for ( const QgsFeatureId &fid : editedFeatureIds )
|
||||
for ( const QgsFeatureId &fid : std::as_const( editedFeatureIds ) )
|
||||
{
|
||||
if ( feedback->isCanceled() )
|
||||
break;
|
||||
@ -208,7 +208,7 @@ QVariantMap QgsSnapGeometriesAlgorithm::processAlgorithm( const QVariantMap &par
|
||||
|
||||
if ( !feedback->isCanceled() )
|
||||
{
|
||||
for ( const QgsFeatureId &fid : editedFeatureIds )
|
||||
for ( const QgsFeatureId &fid : std::as_const( editedFeatureIds ) )
|
||||
{
|
||||
QgsFeature outFeature( editedFeatures.value( fid ) );
|
||||
if ( !sink->addFeature( outFeature ) )
|
||||
|
@ -239,7 +239,7 @@ QgsPoint QgsSnapIndex::getClosestSnapToPoint( const QgsPoint &startPoint, const
|
||||
struct _GEOSQueryCallbackData callbackData;
|
||||
callbackData.list = &items;
|
||||
GEOSSTRtree_query_r( geosctxt, mSTRTree, searchDiagonal.get(), _GEOSQueryCallback, &callbackData );
|
||||
for ( const SnapItem *item : items )
|
||||
for ( const SnapItem *item : std::as_const( items ) )
|
||||
{
|
||||
if ( item->type == SnapSegment )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user