Pins are case-sensitive

Cleanup should remove mis-matched cases

Fixes https://gitlab.com/kicad/code/kicad/issues/14415
This commit is contained in:
Seth Hillbrand 2023-03-24 11:17:37 -07:00
parent 19d0aceda3
commit 0984599624
2 changed files with 3 additions and 3 deletions

View File

@ -397,7 +397,7 @@ bool SCH_SHEET::HasPin( const wxString& aName ) const
{
for( SCH_SHEET_PIN* pin : m_pins )
{
if( pin->GetText().CmpNoCase( aName ) == 0 )
if( pin->GetText().Cmp( aName ) == 0 )
return true;
}
@ -447,7 +447,7 @@ bool SCH_SHEET::HasUndefinedPins() const
for( SCH_ITEM* aItem : m_screen->Items().OfType( SCH_HIER_LABEL_T ) )
{
if( !pin->GetText().CmpNoCase( static_cast<SCH_HIERLABEL*>( aItem )->GetText() ) )
if( !pin->GetText().Cmp( static_cast<SCH_HIERLABEL*>( aItem )->GetText() ) )
{
HLabel = static_cast<SCH_HIERLABEL*>( aItem );
break;

View File

@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE( AddPins )
// now we can find it in the list
BOOST_CHECK_EQUAL( m_sheet.HasPins(), true );
BOOST_CHECK_EQUAL( m_sheet.HasPin( "pinname" ), true );
BOOST_CHECK_EQUAL( m_sheet.HasPin( "PINname" ), true );
BOOST_CHECK_EQUAL( m_sheet.HasPin( "PINname" ), false );
BOOST_CHECK_EQUAL( m_sheet.GetPin( pinPos ), &pinRef );