From dc241df602c3ec9f4a1b3ebe4568f6f75d140cd3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 10 Dec 2019 20:48:44 -0800 Subject: [PATCH] pcbnew: Cleanup stale code --- pcbnew/board_connected_item.h | 99 ----------------------------------- 1 file changed, 99 deletions(-) diff --git a/pcbnew/board_connected_item.h b/pcbnew/board_connected_item.h index a3ffe2da67..dca49511c7 100644 --- a/pcbnew/board_connected_item.h +++ b/pcbnew/board_connected_item.h @@ -196,103 +196,4 @@ private: bool m_localRatsnestVisible; }; - -#if 0 // template for future -/** - * Class BOARD_ITEM_LIST - * is a container for a list of BOARD_ITEMs. - */ -class BOARD_ITEM_LIST : public BOARD_ITEM -{ - typedef boost::ptr_vector ITEM_ARRAY; - - ITEM_ARRAY myItems; - - BOARD_ITEM_LIST( const BOARD_ITEM_LIST& other ) : - BOARD_ITEM( NULL, PCB_ITEM_LIST_T ) - { - // copy constructor is not supported, is private to cause compiler error - } - -public: - - BOARD_ITEM_LIST( BOARD_ITEM* aParent = NULL ) : - BOARD_ITEM( aParent, PCB_ITEM_LIST_T ) - {} - - //-----< satisfy some virtual functions >------------------------------ - const wxPoint GetPosition() - { - return wxPoint(0, 0); // dummy - } - - void Print( PCB_BASE_FRAME* aFrame, wxDC* DC, const wxPoint& aOffset = ZeroOffset ) - { - } - - //---------------------------------- - - /** - * Function GetCount - * returns the number of BOARD_ITEMs. - */ - int GetCount() const - { - return myItems.size(); - } - - void Append( BOARD_ITEM* aItem ) - { - myItems.push_back( aItem ); - } - - BOARD_ITEM* Replace( int aIndex, BOARD_ITEM* aItem ) - { - ITEM_ARRAY::auto_type ret = myItems.replace( aIndex, aItem ); - return ret.release(); - } - - BOARD_ITEM* Remove( int aIndex ) - { - ITEM_ARRAY::auto_type ret = myItems.release( myItems.begin()+aIndex ); - return ret.release(); - } - - void Insert( int aIndex, BOARD_ITEM* aItem ) - { - myItems.insert( myItems.begin()+aIndex, aItem ); - } - - BOARD_ITEM* At( int aIndex ) const - { - // we have varying sized objects and are using polymorphism, so we - // must return a pointer not a reference. - return (BOARD_ITEM*) &myItems[aIndex]; - } - - BOARD_ITEM* operator[]( int aIndex ) const override - { - return At( aIndex ); - } - - void Delete( int aIndex ) - { - myItems.erase( myItems.begin()+aIndex ); - } - - void PushBack( BOARD_ITEM* aItem ) - { - Append( aItem ); - } - - BOARD_ITEM* PopBack() - { - if( GetCount() ) - return Remove( GetCount()-1 ); - - return NULL; - } -}; -#endif // future - #endif // BOARD_CONNECTED_ITEM_H