Skip to content

Commit

Permalink
Fix some copy instead of move warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 15, 2024
1 parent c343317 commit e4bb317
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgseptpointcloudindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ QgsPointCloudStatistics QgsEptPointCloudIndex::metadataStatistics() const

s.classCount = mAttributeClasses[ name ];

statsMap[ name ] = s;
statsMap[ name ] = std::move( s );
}
return QgsPointCloudStatistics( pointCount(), statsMap );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudstatscalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct StatsProcessor
summary.mean = 0;
summary.stDev = std::numeric_limits<double>::quiet_NaN();
summary.classCount.clear();
statsMap[ attribute.name() ] = summary;
statsMap[ attribute.name() ] = std::move( summary );
}

QVector<int> attributeOffsetVector;
Expand Down
3 changes: 1 addition & 2 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1407,8 +1407,7 @@ void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnh
return;
}

const auto constMyBands = myBands;
for ( const int myBand : constMyBands )
for ( const int myBand : std::as_const( myBands ) )
{
if ( myBand != -1 )
{
Expand Down

0 comments on commit e4bb317

Please sign in to comment.