From 5c26b1dabdb7168140c4837dcaa314c17ec04836 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 7 Nov 2018 01:57:55 +0000 Subject: [PATCH] Don't use C-style cast when we don't actually know what it is. --- pcbnew/edit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index e85ebbab67..8e192d81a4 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -837,7 +837,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_UPDATE_FOOTPRINTS: if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T ) { - InstallExchangeModuleFrame( (MODULE*) GetCurItem(), true, true ); + InstallExchangeModuleFrame( dynamic_cast( GetCurItem() ), true, true ); m_canvas->MoveCursorToCrossHair(); } break; @@ -845,7 +845,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_EXCHANGE_FOOTPRINTS: if( GetCurItem() && GetCurItem()->Type() == PCB_MODULE_T ) { - InstallExchangeModuleFrame( (MODULE*) GetCurItem(), false, true ); + InstallExchangeModuleFrame( dynamic_cast( GetCurItem() ), false, true ); m_canvas->MoveCursorToCrossHair(); } break; @@ -1216,11 +1216,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_MENU_PCB_UPDATE_FOOTPRINTS: - InstallExchangeModuleFrame( (MODULE*) GetCurItem(), true, false ); + InstallExchangeModuleFrame( dynamic_cast( GetCurItem() ), true, false ); break; case ID_MENU_PCB_EXCHANGE_FOOTPRINTS: - InstallExchangeModuleFrame( (MODULE*) GetCurItem(), false, false ); + InstallExchangeModuleFrame( dynamic_cast( GetCurItem() ), false, false ); break; case ID_MENU_PCB_SWAP_LAYERS: