Skip to content

Commit

Permalink
Fix clazy unused lambda capture warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 2, 2018
1 parent 1a04dfb commit 574020f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3472,7 +3472,7 @@ void QgsLayoutDesignerDialog::createReportWidget()
void QgsLayoutDesignerDialog::initializeRegistry()
{
sInitializedRegistry = true;
auto createPageWidget = ( [this]( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
auto createPageWidget = ( []( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
{
std::unique_ptr< QgsLayoutPagePropertiesWidget > newWidget = qgis::make_unique< QgsLayoutPagePropertiesWidget >( nullptr, item );
return newWidget.release();
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13239,13 +13239,13 @@ QgsFeature QgisApp::duplicateFeatureDigitized( QgsMapLayer *mlayer, const QgsFea
childrenInfo += ( tr( "%1 children on layer %2 duplicated" ).arg( duplicateFeatureContext.duplicatedFeatures( chl ).size() ).arg( chl->name() ) );
}

messageBar()->pushMessage( tr( "Feature on layer %2 duplicated\n%3" ).arg( layer->name() ).arg( childrenInfo ), QgsMessageBar::SUCCESS, 5 );
messageBar()->pushMessage( tr( "Feature on layer %2 duplicated\n%3" ).arg( layer->name(), childrenInfo ), QgsMessageBar::SUCCESS, 5 );

mMapCanvas->unsetMapTool( digitizeFeature );
}
);

connect( digitizeFeature, static_cast<void ( QgsMapToolDigitizeFeature::* )()>( &QgsMapToolDigitizeFeature::digitizingFinished ), this, [this, digitizeFeature]()
connect( digitizeFeature, static_cast<void ( QgsMapToolDigitizeFeature::* )()>( &QgsMapToolDigitizeFeature::digitizingFinished ), this, [digitizeFeature]()
{
digitizeFeature->deleteLater();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgswelcomepage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void QgsWelcomePage::showContextMenuForProjects( QPoint point )
menu->addAction( pinAction );
}
QAction *openFolderAction = new QAction( tr( "Open Directory…" ), menu );
connect( openFolderAction, &QAction::triggered, this, [this, path]
connect( openFolderAction, &QAction::triggered, this, [path]
{
QFileInfo fi( path );
QString folder = fi.path();
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgscurvepolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ QgsCurvePolygon *QgsCurvePolygon::snappedToGrid( double hSpacing, double vSpacin
bool QgsCurvePolygon::removeDuplicateNodes( double epsilon, bool useZValues )
{
bool result = false;
auto cleanRing = [this, &result, epsilon, useZValues ]( QgsCurve * ring )->bool
auto cleanRing = [epsilon, useZValues ]( QgsCurve * ring )->bool
{
if ( ring->numPoints() <= 4 )
return false;
Expand Down

0 comments on commit 574020f

Please sign in to comment.