diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index 2bc2d99971..daaeafd425 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -744,8 +744,9 @@ int ERC_TESTER::TestLibSymbolIssues() } std::unique_ptr flattenedSymbol = libSymbol->Flatten(); + constexpr int flags = LIB_ITEM::COMPARE_FLAGS::EQUALITY | LIB_ITEM::COMPARE_FLAGS::ERC; - if( *flattenedSymbol != *libSymbolInSchematic ) + if( flattenedSymbol->Compare( *libSymbolInSchematic, flags ) != 0 ) { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES ); ercItem->SetItems( symbol ); diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 1f46eee959..3205b0ea8e 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -179,7 +179,7 @@ void LIB_FIELD::Copy( LIB_FIELD* aTarget ) const } -int LIB_FIELD::compare( const LIB_ITEM& aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags ) const +int LIB_FIELD::compare( const LIB_ITEM& aOther, int aCompareFlags ) const { wxASSERT( aOther.Type() == LIB_FIELD_T ); diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h index 696507c2b0..58bd61179c 100644 --- a/eeschema/lib_field.h +++ b/eeschema/lib_field.h @@ -185,8 +185,7 @@ private: * - Field width. * - Field height. */ - int compare( const LIB_ITEM& aOther, - LIB_ITEM::COMPARE_FLAGS aCompareFlags = LIB_ITEM::COMPARE_FLAGS::NORMAL ) const override; + int compare( const LIB_ITEM& aOther, int aCompareFlags = 0 ) const override; /** * Print the field. diff --git a/eeschema/lib_item.cpp b/eeschema/lib_item.cpp index 4ced5f420d..eb2c7a59f9 100644 --- a/eeschema/lib_item.cpp +++ b/eeschema/lib_item.cpp @@ -64,7 +64,7 @@ void LIB_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector