Fix a few minor Coverity warnings
This commit is contained in:
parent
9b20e7debb
commit
488a53e71b
|
@ -629,12 +629,10 @@ wxString DIALOG_SIM_MODEL<T>::getSymbolPinString( int symbolPinNumber ) const
|
|||
if( symbolPin )
|
||||
name = symbolPin->GetShownName();
|
||||
|
||||
LOCALE_IO toggle;
|
||||
|
||||
if( name.IsEmpty() )
|
||||
return wxString::Format( "%d", symbolPinNumber );
|
||||
else
|
||||
return wxString::Format( "%d (%s)", symbolPinNumber, symbolPin->GetShownName() );
|
||||
return wxString::Format( "%d (%s)", symbolPinNumber, name );
|
||||
}
|
||||
|
||||
|
||||
|
@ -643,8 +641,6 @@ wxString DIALOG_SIM_MODEL<T>::getModelPinString( int modelPinNumber ) const
|
|||
{
|
||||
const wxString& pinName = curModel().GetPin( modelPinNumber - 1 ).name;
|
||||
|
||||
LOCALE_IO toggle;
|
||||
|
||||
if( pinName.IsEmpty() )
|
||||
return wxString::Format( "%d", modelPinNumber, pinName );
|
||||
else
|
||||
|
|
|
@ -191,9 +191,11 @@ SIM_STRING_VALIDATOR::SIM_STRING_VALIDATOR( SIM_VALUE::TYPE aValueType,
|
|||
SIM_VALUE_GRAMMAR::NOTATION aNotation )
|
||||
: SIM_VALIDATOR(),
|
||||
m_valueType( aValueType ),
|
||||
m_notation( aNotation )
|
||||
m_notation( aNotation ),
|
||||
m_prevInsertionPoint( 0 )
|
||||
{
|
||||
wxTextEntry* textEntry = getTextEntry();
|
||||
|
||||
if( !textEntry )
|
||||
return;
|
||||
|
||||
|
|
|
@ -1569,7 +1569,11 @@ void DIALOG_NET_INSPECTOR::updateNet( NETINFO_ITEM* aNet )
|
|||
|
||||
unsigned int DIALOG_NET_INSPECTOR::calculateViaLength( const PCB_TRACK* aTrack ) const
|
||||
{
|
||||
const PCB_VIA* via = dynamic_cast<const PCB_VIA*>( aTrack );
|
||||
const PCB_VIA* via = dynamic_cast<const PCB_VIA*>( aTrack );
|
||||
|
||||
if( !via )
|
||||
return 0;
|
||||
|
||||
BOARD_DESIGN_SETTINGS& bds = m_brd->GetDesignSettings();
|
||||
|
||||
// calculate the via length individually from the board stackup and via's start and end layer.
|
||||
|
|
Loading…
Reference in New Issue