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

This commit is contained in:
Mark Olesen
2010-10-04 14:58:37 +02:00
parent d01a47aeee
commit 4790b59dac
2 changed files with 0 additions and 43 deletions

View File

@ -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)

View File

@ -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>&);