Skip to content

Commit

Permalink
Fix some copy instead of move warnings
Browse files Browse the repository at this point in the history
(cherry picked from commit 6bd1e2c)
  • Loading branch information
nyalldawson committed Dec 16, 2024
1 parent 5206ee9 commit e3ac9f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudstatscalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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 e3ac9f6

Please sign in to comment.