diff --git a/common/dialogs/dialog_grid_settings.cpp b/common/dialogs/dialog_grid_settings.cpp index efe303ed89..d2da138c97 100644 --- a/common/dialogs/dialog_grid_settings.cpp +++ b/common/dialogs/dialog_grid_settings.cpp @@ -130,7 +130,7 @@ bool DIALOG_GRID_SETTINGS::TransferDataFromWindow() mgr->ResetTools( TOOL_BASE::REDRAW ); // Notify GAL - mgr->RunAction( ACTIONS::gridPreset, true, static_cast( gridCfg.last_size_idx ) ); + mgr->RunAction( ACTIONS::gridPreset, true, gridCfg.last_size_idx ); mgr->RunAction( ACTIONS::gridSetOrigin, true, new VECTOR2D( m_parent->GetGridOrigin() ) ); m_parent->UpdateGridSelectBox(); diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 6db0ef7872..f587ec2342 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -192,9 +192,9 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) bbox = footprint->GetBoundingBox( true, false ); // No invisible text in bbox calc if( pad ) - m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, (void*) pad ); + m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, pad ); else - m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, (void*) footprint ); + m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, footprint ); } else if( netcode > 0 || multiHighlight ) { @@ -645,13 +645,11 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) if( selectConnections ) { - GetToolManager()->RunAction( PCB_ACTIONS::syncSelectionWithNets, true, - static_cast( &items ) ); + GetToolManager()->RunAction( PCB_ACTIONS::syncSelectionWithNets, true, &items ); } else { - GetToolManager()->RunAction( PCB_ACTIONS::syncSelection, true, - static_cast( &items ) ); + GetToolManager()->RunAction( PCB_ACTIONS::syncSelection, true, &items ); } // Update 3D viewer highlighting diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 73eb1d396b..f72d39a184 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -1038,7 +1038,7 @@ int ROUTER_TOOL::handleLayerSwitch( const TOOL_EVENT& aEvent, bool aForceVia ) // Otherwise it is one of the router-specific via commands if( targetLayer == UNDEFINED_LAYER ) { - const int actViaFlags = aEvent.Parameter(); + const int actViaFlags = static_cast( aEvent.Parameter() ); selectLayer = actViaFlags & VIA_ACTION_FLAGS::SELECT_LAYER; viaType = getViaTypeFromFlags( actViaFlags ); @@ -2234,7 +2234,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) p = controls()->GetCursorPosition(); } - int dragMode = aEvent.Parameter (); + int dragMode = aEvent.Parameter (); bool dragStarted = m_router->StartDragging( p, itemsToDrag, dragMode ); diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index 23a0363b4a..184c27a3d4 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -1481,7 +1481,7 @@ int BOARD_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) }, true /* prompt user regarding locked items */ ); - intptr_t netCode = -1; + int netCode = -1; wxString netName; for( EDA_ITEM* item : selection ) @@ -1503,7 +1503,7 @@ int BOARD_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent ) } selectionTool->ClearSelection(); - m_toolMgr->RunAction( PCB_ACTIONS::selectNet, true, (void*) netCode ); + m_toolMgr->RunAction( PCB_ACTIONS::selectNet, true, netCode ); canvas()->ForceRefresh(); DIALOG_ASSIGN_NETCLASS dlg( m_frame, netName, board()->GetNetClassAssignmentCandidates(), diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index c8eb1bc305..47bf0038d3 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -1519,7 +1519,7 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); if( item ) - m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, (void*) item ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, item ); } m_frame->m_probingSchToPcb = false; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 79f91f91c6..a0e5e735e1 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -283,7 +283,7 @@ int EDIT_TOOL::GetAndPlace( const TOOL_EVENT& aEvent ) if( fp ) { m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, (void*) fp ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, fp ); selectionTool->GetSelection().SetReferencePoint( fp->GetPosition() ); m_toolMgr->RunAction( PCB_ACTIONS::move, false ); @@ -314,8 +314,7 @@ bool EDIT_TOOL::invokeInlineRouter( int aDragMode ) if( theRouter->CanInlineDrag( aDragMode ) ) { - m_toolMgr->RunAction( PCB_ACTIONS::routerInlineDrag, true, - static_cast( aDragMode ) ); + m_toolMgr->RunAction( PCB_ACTIONS::routerInlineDrag, true, aDragMode ); return true; } diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index e0fa08f959..c55a46b67b 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -3194,8 +3194,7 @@ void APPEARANCE_CONTROLS::onNetclassContextMenu( wxCommandEvent& aEvent ) runOnNetsOfClass( m_contextMenuNetclass, [&]( NETINFO_ITEM* aItem ) { - toolMgr->RunAction( action, true, - static_cast( aItem->GetNetCode() ) ); + toolMgr->RunAction( action, true, aItem->GetNetCode() ); } ); } break;