Fix a few Coverity warnings.
This commit is contained in:
parent
523b37d9ae
commit
26acd39129
|
@ -437,6 +437,7 @@ void FIELDS_GRID_TABLE<T>::SetValue( int aRow, int aCol, const wxString &aValue
|
|||
field.SetTextAngle( TEXT_ANGLE_VERT );
|
||||
else
|
||||
wxFAIL_MSG( wxT( "unknown orientation: " ) + aValue );
|
||||
break;
|
||||
|
||||
case FDC_POSX:
|
||||
case FDC_POSY:
|
||||
|
|
|
@ -140,7 +140,9 @@ void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* aText )
|
|||
m_canvas->RefreshDrawingRect( aText->GetBoundingBox() );
|
||||
aText->DeleteStructure();
|
||||
OnModify();
|
||||
module->SetLastEditTime();
|
||||
|
||||
if( module )
|
||||
module->SetLastEditTime();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -761,7 +761,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
auto& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
|
||||
|
||||
if( selection.Empty() )
|
||||
return 0;
|
||||
|
@ -1028,7 +1028,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
|
|||
|
||||
for( auto selItem : selection )
|
||||
{
|
||||
BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( selItem );
|
||||
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( selItem );
|
||||
|
||||
if( !item->IsNew() && !EditingModules() )
|
||||
m_commit->Modify( item );
|
||||
|
|
Loading…
Reference in New Issue