diff --git a/eeschema/block.cpp b/eeschema/block.cpp index 6589ac83fe..27a7482c0c 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -138,7 +138,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) for( unsigned ii = 0; ii < block->GetItems().GetCount(); ii++ ) { - SCH_ITEM* item = dynamic_cast( block->GetItems().GetPickedItem( ii ) ); + SCH_ITEM* item = static_cast( block->GetItems().GetPickedItem( ii ) ); item->Move( block->GetMoveVector() ); item->SetFlags( IS_MOVED ); GetCanvas()->GetView()->Update( item, KIGFX::GEOMETRY ); diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp index 3f0a2d9a9d..625ae31afa 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.cpp +++ b/eeschema/dialogs/dialog_fields_editor_global.cpp @@ -431,7 +431,7 @@ public: { // Commit any pending in-place edits before the row gets moved out from under // the editor. - dynamic_cast( GetView() )->CommitPendingChanges( true ); + static_cast( GetView() )->CommitPendingChanges( true ); wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_rows.size() ); GetView()->ProcessTableMessage( msg ); diff --git a/gerbview/dialogs/panel_gerbview_display_options.cpp b/gerbview/dialogs/panel_gerbview_display_options.cpp index b2227711d3..5374022258 100644 --- a/gerbview/dialogs/panel_gerbview_display_options.cpp +++ b/gerbview/dialogs/panel_gerbview_display_options.cpp @@ -94,7 +94,7 @@ bool PANEL_GERBVIEW_DISPLAY_OPTIONS::TransferDataFromWindow() // Apply changes to the GAL auto view = m_Parent->GetGalCanvas()->GetView(); - auto painter = dynamic_cast( view->GetPainter() ); + auto painter = static_cast( view->GetPainter() ); auto settings = painter->GetSettings(); settings->LoadDisplayOptions( displayOptions ); view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index b34150c5f3..2c3e8be896 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -1100,6 +1100,10 @@ void DRC::testCopperDrawItem( DRAWSEGMENT* aItem ) void DRC::testCopperTextItem( BOARD_ITEM* aTextItem ) { EDA_TEXT* text = dynamic_cast( aTextItem ); + + if( text == nullptr ) + return; + std::vector textShape; // a buffer to store the text shape (set of segments) int textWidth = text->GetThickness();