diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index f3f90a9317..fe449920a5 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -436,7 +436,7 @@ void SCH_EDITOR_CONTROL::doCrossProbeSchToPcb( const TOOL_EVENT& aEvent, bool aF #ifdef KICAD_SPICE int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) { - PICKER_TOOL* picker = m_toolMgr->GetTool(); + PICKER_TOOL* picker = m_toolMgr->GetTool(); // Deactivate other tools; particularly important if another PICKER is currently running Activate(); @@ -444,7 +444,7 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) picker->SetCursor( SIMULATION_CURSORS::GetCursor( SIMULATION_CURSORS::CURSOR::PROBE ) ); picker->SetClickHandler( - [&]( const VECTOR2D& aPosition ) + [this] ( const VECTOR2D& aPosition ) { KICAD_T wiresAndComponents[] = { SCH_LINE_T, SCH_COMPONENT_T, SCH_SHEET_PIN_T, EOT }; @@ -473,7 +473,7 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) return true; } ); - std::string tool = aEvent.GetCommandStr().get(); + std::string tool = aEvent.GetCommandStr().get(); m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool ); return 0; @@ -482,7 +482,7 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent ) { - PICKER_TOOL* picker = m_toolMgr->GetTool(); + PICKER_TOOL* picker = m_toolMgr->GetTool(); // Deactivate other tools; particularly important if another PICKER is currently running Activate(); @@ -490,7 +490,7 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent ) picker->SetCursor( SIMULATION_CURSORS::GetCursor( SIMULATION_CURSORS::CURSOR::TUNE ) ); picker->SetClickHandler( - [&]( const VECTOR2D& aPosition ) + [this] ( const VECTOR2D& aPosition ) { KICAD_T fieldsAndComponents[] = { SCH_COMPONENT_T, SCH_FIELD_T, EOT }; @@ -684,7 +684,7 @@ int SCH_EDITOR_CONTROL::HighlightNetCursor( const TOOL_EVENT& aEvent ) picker->SetCursor( wxStockCursor( wxCURSOR_BULLSEYE ) ); picker->SetClickHandler( - [this]( const VECTOR2D& aPos ) + [this] ( const VECTOR2D& aPos ) { return highlightNet( m_toolMgr, aPos ); } ); diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index dbf0680bfb..0cb79252c2 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -1345,7 +1345,7 @@ int PCB_EDITOR_CONTROL::LocalRatsnestTool( const TOOL_EVENT& aEvent ) Activate(); picker->SetClickHandler( - [&] ( const VECTOR2D& pt ) -> bool + [this, board, opt]( const VECTOR2D& pt ) -> bool { SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); @@ -1393,7 +1393,7 @@ int PCB_EDITOR_CONTROL::LocalRatsnestTool( const TOOL_EVENT& aEvent ) } ); picker->SetFinalizeHandler( - [ board, opt ]( int aCondition ) + [board, opt] ( int aCondition ) { if( aCondition != PCBNEW_PICKER_TOOL::END_ACTIVATE ) { diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 63aaae2886..2e8e2caf2e 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -552,7 +552,7 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent ) } ); picker->SetFinalizeHandler( - [&]( const int& aFinalState ) + [this] ( const int& aFinalState ) { if( m_pickerItem ) m_toolMgr->GetTool()->UnbrightenItem( m_pickerItem );