7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 14:41:42 +00:00

Silence override warnings on recent GCC

This commit is contained in:
Jon Evans 2024-11-06 22:29:54 -05:00
parent 5d7942a45f
commit 07bd497d9c
2 changed files with 28 additions and 0 deletions

View File

@ -227,6 +227,17 @@ bool PCB_ARC::operator==( const BOARD_ITEM& aBoardItem ) const
}
bool PCB_ARC::operator==( const PCB_TRACK& aOther ) const
{
if( aOther.Type() != Type() )
return false;
const PCB_ARC& other = static_cast<const PCB_ARC&>( aOther );
return *this == other;
}
bool PCB_ARC::operator==( const PCB_ARC& aOther ) const
{
return m_Start == aOther.m_Start
@ -284,6 +295,17 @@ bool PCB_VIA::operator==( const BOARD_ITEM& aBoardItem ) const
}
bool PCB_VIA::operator==( const PCB_TRACK& aOther ) const
{
if( aOther.Type() != Type() )
return false;
const PCB_VIA& other = static_cast<const PCB_VIA&>( aOther );
return *this == other;
}
bool PCB_VIA::operator==( const PCB_VIA& aOther ) const
{
return m_Start == aOther.m_Start

View File

@ -357,6 +357,9 @@ protected:
virtual void swapData( BOARD_ITEM* aImage ) override;
private:
// Silence GCC warning about overriding the base class method
bool operator==( const PCB_TRACK& aOther ) const override;
VECTOR2I m_Mid; ///< Arc mid point, halfway between start and end
};
@ -657,6 +660,9 @@ protected:
wxString layerMaskDescribe() const override;
private:
// Silence GCC warning about hiding the PCB_TRACK base method
bool operator==( const PCB_TRACK& aOther ) const override;
VIATYPE m_viaType; ///< through, blind/buried or micro
PADSTACK m_padStack;