Don't use C-style cast when we don't actually know what it is.

This commit is contained in:
Jeff Young 2018-11-07 01:57:55 +00:00
parent 3439551543
commit 5c26b1dabd
1 changed files with 4 additions and 4 deletions

View File

@ -837,7 +837,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_UPDATE_FOOTPRINTS: case ID_POPUP_PCB_UPDATE_FOOTPRINTS:
if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T ) if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T )
{ {
InstallExchangeModuleFrame( (MODULE*) GetCurItem(), true, true ); InstallExchangeModuleFrame( dynamic_cast<MODULE*>( GetCurItem() ), true, true );
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
} }
break; break;
@ -845,7 +845,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_EXCHANGE_FOOTPRINTS: case ID_POPUP_PCB_EXCHANGE_FOOTPRINTS:
if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T ) if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T )
{ {
InstallExchangeModuleFrame( (MODULE*) GetCurItem(), false, true ); InstallExchangeModuleFrame( dynamic_cast<MODULE*>( GetCurItem() ), false, true );
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
} }
break; break;
@ -1216,11 +1216,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_MENU_PCB_UPDATE_FOOTPRINTS: case ID_MENU_PCB_UPDATE_FOOTPRINTS:
InstallExchangeModuleFrame( (MODULE*) GetCurItem(), true, false ); InstallExchangeModuleFrame( dynamic_cast<MODULE*>( GetCurItem() ), true, false );
break; break;
case ID_MENU_PCB_EXCHANGE_FOOTPRINTS: case ID_MENU_PCB_EXCHANGE_FOOTPRINTS:
InstallExchangeModuleFrame( (MODULE*) GetCurItem(), false, false ); InstallExchangeModuleFrame( dynamic_cast<MODULE*>( GetCurItem() ), false, false );
break; break;
case ID_MENU_PCB_SWAP_LAYERS: case ID_MENU_PCB_SWAP_LAYERS: