Commit 4790b59d authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: copy/assignment from IndirectList in List no longer needed

parent d01a47ae
......@@ -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>&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment