Explicitly delete ctor/copy constr

This will throw the error when compiling instead of when running if a
developer accidentally instantiates the BOARD() ctor or copy
constructor.
This commit is contained in:
Seth Hillbrand 2019-11-07 18:07:12 -08:00
parent 6182133a4e
commit 7f507a4e6b
1 changed files with 2 additions and 10 deletions

View File

@ -201,17 +201,9 @@ private:
// The default copy constructor & operator= are inadequate,
// either write one or do not use it at all
BOARD( const BOARD& aOther ) :
BOARD_ITEM_CONTAINER( aOther ), m_NetInfo( this )
{
assert( false );
}
BOARD( const BOARD& aOther ) = delete;
BOARD& operator=( const BOARD& aOther )
{
assert( false );
return *this; // just to mute warning
}
BOARD& operator=( const BOARD& aOther ) = delete;
public:
static inline bool ClassOf( const EDA_ITEM* aItem )