From 4790b59daccc8ad167c73101e9f9e7e1db7f8f45 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Mon, 4 Oct 2010 14:58:37 +0200 Subject: [PATCH] STYLE: copy/assignment from IndirectList in List no longer needed --- src/OpenFOAM/containers/Lists/List/List.C | 37 ----------------------- src/OpenFOAM/containers/Lists/List/List.H | 6 ---- 2 files changed, 43 deletions(-) diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index 934fc085f4d..ae4a36a8058 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -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) diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 2999e0886ed..d51a1f9eefc 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -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>&); -- GitLab