Fix a few coverity warnings. very minor other changes.
This commit is contained in:
parent
e5c4cfc3b0
commit
c536364f05
|
@ -103,15 +103,15 @@ const COLOR4D& GERBVIEW_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int a
|
|||
return m_layerColorsSel[aLayer];
|
||||
}
|
||||
|
||||
if( !m_netHighlightString.IsEmpty() &&
|
||||
if( !m_netHighlightString.IsEmpty() && item &&
|
||||
m_netHighlightString == item->GetNetAttributes().m_Netname )
|
||||
return m_layerColorsHi[aLayer];
|
||||
|
||||
if( !m_componentHighlightString.IsEmpty() &&
|
||||
if( !m_componentHighlightString.IsEmpty() && item &&
|
||||
m_componentHighlightString == item->GetNetAttributes().m_Cmpref )
|
||||
return m_layerColorsHi[aLayer];
|
||||
|
||||
if( !m_attributeHighlightString.IsEmpty() && item->GetDcodeDescr() &&
|
||||
if( !m_attributeHighlightString.IsEmpty() && item && item->GetDcodeDescr() &&
|
||||
m_attributeHighlightString == item->GetDcodeDescr()->m_AperFunction )
|
||||
return m_layerColorsHi[aLayer];
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event )
|
|||
BOARD* board = m_parent->GetBoard();
|
||||
LSEQ cu_stack = LSET::AllCuMask( board->GetCopperLayerCount() ).UIOrder();
|
||||
|
||||
if( row < (int)cu_stack.size() )
|
||||
if( row >= 0 && row < (int)cu_stack.size() )
|
||||
{
|
||||
m_zonesettings.m_Layers.set( cu_stack[ row ], selected );
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2015-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -184,7 +184,7 @@ void DIALOG_GEN_MODULE_POSITION::OnOutputDirectoryBrowseClicked( wxCommandEvent&
|
|||
|
||||
wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
|
||||
|
||||
wxMessageDialog dialog( this, _( "Use a relative path? "),
|
||||
wxMessageDialog dialog( this, _( "Use a relative path?"),
|
||||
_( "Plot Output Directory" ),
|
||||
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
|
||||
|
|
|
@ -2799,6 +2799,7 @@ void SPECCTRA_DB::doWIRE( WIRE* growth )
|
|||
|
||||
case T_polyline_path:
|
||||
tok = T_path;
|
||||
// Fall through
|
||||
case T_path:
|
||||
case T_polygon:
|
||||
if( growth->shape )
|
||||
|
|
|
@ -958,8 +958,11 @@ public:
|
|||
const char* quote = out->GetQuoteChar( name.c_str() );
|
||||
out->Print( 0, " %s%s%s", quote, name.c_str(), quote );
|
||||
}
|
||||
// Could be not needed:
|
||||
#if 1
|
||||
else
|
||||
out->Print( 0, " \"\"" ); // the zone with no name or net_code == 0
|
||||
#endif
|
||||
|
||||
if( sequence_number != -1 )
|
||||
out->Print( 0, " (sequence_number %d)", sequence_number );
|
||||
|
|
Loading…
Reference in New Issue