mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: copy/assignment from IndirectList in List no longer needed
This commit is contained in:
@ -266,24 +266,6 @@ Foam::List<T>::List(const SLList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of IndirectList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const IndirectList<T>& lst)
|
||||
:
|
||||
UList<T>(NULL, lst.size())
|
||||
{
|
||||
if (this->size_)
|
||||
{
|
||||
this->v_ = new T[this->size_];
|
||||
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i) = lst[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy of UIndirectList<T>
|
||||
template<class T>
|
||||
Foam::List<T>::List(const UIndirectList<T>& lst)
|
||||
@ -517,25 +499,6 @@ void Foam::List<T>::operator=(const SLList<T>& lst)
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const IndirectList<T>& lst)
|
||||
{
|
||||
if (lst.size() != this->size_)
|
||||
{
|
||||
if (this->v_) delete[] this->v_;
|
||||
this->v_ = 0;
|
||||
this->size_ = lst.size();
|
||||
if (this->size_) this->v_ = new T[this->size_];
|
||||
}
|
||||
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i) = lst[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Assignment operator. Takes linear time.
|
||||
template<class T>
|
||||
void Foam::List<T>::operator=(const UIndirectList<T>& lst)
|
||||
|
||||
@ -131,9 +131,6 @@ public:
|
||||
//- Construct as copy of SLList<T>
|
||||
explicit List(const SLList<T>&);
|
||||
|
||||
//- Construct as copy of IndirectList<T>
|
||||
explicit List(const IndirectList<T>&);
|
||||
|
||||
//- Construct as copy of UIndirectList<T>
|
||||
explicit List(const UIndirectList<T>&);
|
||||
|
||||
@ -219,9 +216,6 @@ public:
|
||||
//- Assignment from SLList operator. Takes linear time.
|
||||
void operator=(const SLList<T>&);
|
||||
|
||||
//- Assignment from IndirectList operator. Takes linear time.
|
||||
void operator=(const IndirectList<T>&);
|
||||
|
||||
//- Assignment from UIndirectList operator. Takes linear time.
|
||||
void operator=(const UIndirectList<T>&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user