diff --git a/src/libCom/cxxTemplates/tsDLList.h b/src/libCom/cxxTemplates/tsDLList.h index a664dc0ae..0081b326b 100644 --- a/src/libCom/cxxTemplates/tsDLList.h +++ b/src/libCom/cxxTemplates/tsDLList.h @@ -59,6 +59,7 @@ public: void add ( tsDLList & addList ); // add to end of list - addList left empty void push ( T & item ); // add item to beginning of list void remove ( T & item ); // remove item from list + void removeAll ( tsDLList & destination ); T * get (); // removes first item on list T * pop (); // same as get () void insertAfter ( T & item, T & itemBefore ); // insert item immediately after itemBefore @@ -239,6 +240,21 @@ inline void tsDLList::remove ( T &item ) this->itemCount--; } +// +// tsDLList::removeAll () +// +template +inline void tsDLList::removeAll ( + tsDLList & destination ) +{ + destination.pFirst = this->pFirst; + destination.pLast = this->pLast; + destination.itemCount = this->itemCount; + this->pFirst = 0; + this->pLast = 0; + this->itemCount = 0; +} + // // tsDLList::get () //