Add PCB_VIA equality operator overload

This commit is contained in:
Marek Roszko 2024-06-04 21:34:14 -04:00
parent 34f0fb8f21
commit 944835eefc
2 changed files with 10 additions and 4 deletions

View File

@ -251,10 +251,15 @@ bool PCB_VIA::operator==( const BOARD_ITEM& aOther ) const
const PCB_VIA& other = static_cast<const PCB_VIA&>( aOther );
return m_Start == other.m_Start && m_End == other.m_End && m_layer == other.m_layer &&
m_padStack == other.m_padStack && m_Width == other.m_Width &&
m_viaType == other.m_viaType &&
m_zoneLayerOverrides == other.m_zoneLayerOverrides;
return *this == other;
}
bool PCB_VIA::operator==( const PCB_VIA& aOther ) const
{
return m_Start == aOther.m_Start && m_End == aOther.m_End && m_layer == aOther.m_layer
&& m_padStack == aOther.m_padStack && m_Width == aOther.m_Width
&& m_viaType == aOther.m_viaType && m_zoneLayerOverrides == aOther.m_zoneLayerOverrides;
}

View File

@ -649,6 +649,7 @@ public:
double Similarity( const BOARD_ITEM& aOther ) const override;
bool operator==( const PCB_VIA& aOther ) const;
bool operator==( const BOARD_ITEM& aOther ) const override;
void Serialize( google::protobuf::Any &aContainer ) const override;