diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 9a10aa6e07..13948f59f3 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -2216,9 +2216,9 @@ BOARD_ITEM* FOOTPRINT::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToFootpr if( aAddToFootprint ) { group->RunOnDescendants( - [&]( BOARD_ITEM* aItem ) + [&]( BOARD_ITEM* aCurrItem ) { - Add( aItem ); + Add( aCurrItem ); } ); Add( new_item ); diff --git a/pcbnew/tracks_cleaner.cpp b/pcbnew/tracks_cleaner.cpp index 9d134045d3..91e2edeea6 100644 --- a/pcbnew/tracks_cleaner.cpp +++ b/pcbnew/tracks_cleaner.cpp @@ -629,8 +629,6 @@ bool TRACKS_CLEANER::mergeCollinearSegments( PCB_TRACK* aSeg1, PCB_TRACK* aSeg2 collectPts( item ); } - int64_t combined_length = aSeg1->GetLength() + aSeg2->GetLength(); - // This means there is a node in the center if( pts.size() > 2 ) return false;