Fix MSVC not understanding operator== anymore

This commit is contained in:
Jon Evans 2024-06-08 17:27:34 -04:00
parent f5e7c705db
commit 3bb7b3722c
2 changed files with 12 additions and 0 deletions

View File

@ -798,6 +798,17 @@ bool PCB_SHAPE::operator==( const BOARD_ITEM& aOther ) const
const PCB_SHAPE& other = static_cast<const PCB_SHAPE&>( aOther );
return *this == other;
}
bool PCB_SHAPE::operator==( const PCB_SHAPE& aOther ) const
{
if( aOther.Type() != Type() )
return false;
const PCB_SHAPE& other = static_cast<const PCB_SHAPE&>( aOther );
if( m_layer != other.m_layer )
return false;

View File

@ -165,6 +165,7 @@ public:
double Similarity( const BOARD_ITEM& aBoardItem ) const override;
bool operator==( const PCB_SHAPE& aShape ) const;
bool operator==( const BOARD_ITEM& aBoardItem ) const override;
#if defined(DEBUG)