mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add UPtrList swap() method
This commit is contained in:
@ -169,6 +169,9 @@ public:
|
|||||||
//- Return true if the UPtrList is empty (ie, size() is zero)
|
//- Return true if the UPtrList is empty (ie, size() is zero)
|
||||||
inline bool empty() const;
|
inline bool empty() const;
|
||||||
|
|
||||||
|
//- Swap content with another UPtrList
|
||||||
|
inline void swap(UPtrList<T>& lst);
|
||||||
|
|
||||||
//- Return reference to the first element of the list
|
//- Return reference to the first element of the list
|
||||||
inline T& first();
|
inline T& first();
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,13 @@ inline bool Foam::UPtrList<T>::empty() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline void Foam::UPtrList<T>::swap(UPtrList<T>& lst)
|
||||||
|
{
|
||||||
|
ptrs_.swap(lst.ptrs_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline T& Foam::UPtrList<T>::first()
|
inline T& Foam::UPtrList<T>::first()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user