UPtrList: Added append for consistency with PtrList
This commit is contained in:
@ -128,6 +128,9 @@ public:
|
||||
//- Clear the UPtrList, i.e. set size to zero
|
||||
void clear();
|
||||
|
||||
//- Append an element at the end of the list
|
||||
inline void append(T*);
|
||||
|
||||
//- Transfer the contents of the argument UPtrList into this
|
||||
// UPtrList and annul the argument list
|
||||
void transfer(UPtrList<T>&);
|
||||
|
||||
@ -74,6 +74,15 @@ inline void Foam::UPtrList<T>::resize(const label newSize)
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline void Foam::UPtrList<T>::append(T* ptr)
|
||||
{
|
||||
label sz = this->size();
|
||||
this->setSize(sz+1);
|
||||
this->ptrs_[sz] = ptr;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline bool Foam::UPtrList<T>::set(const label i) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user