fix MANDATORY_FIELDS comparisons (need to exclude -1)
This commit is contained in:
parent
8b2b1381c4
commit
375a4e28d6
|
@ -1099,7 +1099,7 @@ bool LIB_PART::LoadField( LINE_READER& aLineReader, wxString& aErrorMsg )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( field->GetId() < MANDATORY_FIELDS )
|
||||
if( (unsigned) field->GetId() < MANDATORY_FIELDS )
|
||||
{
|
||||
LIB_FIELD* fixedField = GetField( field->GetId() );
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ bool LIB_FIELD::Load( LINE_READER& aLineReader, wxString& errorMsg )
|
|||
}
|
||||
|
||||
// fields in RAM must always have names.
|
||||
if( m_id < MANDATORY_FIELDS )
|
||||
if( (unsigned) m_id < MANDATORY_FIELDS )
|
||||
{
|
||||
// Fields in RAM must always have names, because we are trying to get
|
||||
// less dependent on field ids and more dependent on names.
|
||||
|
|
|
@ -895,7 +895,7 @@ void SCH_COMPONENT::UpdateFields( bool aResetStyle, bool aResetRef )
|
|||
|
||||
if( idx == REFERENCE && !aResetRef )
|
||||
continue;
|
||||
if( idx < MANDATORY_FIELDS )
|
||||
if( (unsigned) idx < MANDATORY_FIELDS )
|
||||
schField = GetField( idx );
|
||||
else
|
||||
schField = FindField( field.GetName() );
|
||||
|
|
|
@ -2747,7 +2747,7 @@ void SCH_LEGACY_PLUGIN_CACHE::loadField( std::unique_ptr< LIB_PART >& aPart,
|
|||
}
|
||||
|
||||
// Fields in RAM must always have names.
|
||||
if( id < MANDATORY_FIELDS )
|
||||
if( (unsigned) id < MANDATORY_FIELDS )
|
||||
{
|
||||
// Fields in RAM must always have names, because we are trying to get
|
||||
// less dependent on field ids and more dependent on names.
|
||||
|
|
Loading…
Reference in New Issue