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:
parent
6182133a4e
commit
7f507a4e6b
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue