Skip to content
Snippets Groups Projects
Commit 064d3046 authored by Henry Weller's avatar Henry Weller
Browse files

List: Removed unused constructor from iterators

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2074
parent aa09dd3f
Branches
Tags
1 merge request!60Merge foundation
...@@ -132,35 +132,6 @@ int main(int argc, char *argv[]) ...@@ -132,35 +132,6 @@ int main(int argc, char *argv[])
<< "-wordList: " << wLst << nl << "-wordList: " << wLst << nl
<< "-stringList: " << sLst << endl; << "-stringList: " << sLst << endl;
Info<< nl
<< "Test List Iterator Constuctor" << endl;
List<vector> initialList(IStringStream("((0 1 2) (3 4 5) (6 7 8))")());
Info<< " Initial List: " << initialList << endl;
List<vector> iteratorList(initialList.begin(), initialList.end());
Info<< " Foam::List constructed from Foam::List: "
<< iteratorList << endl;
std::list<vector> stlList(initialList.begin(), initialList.end());
Info<< " std::list constructed from Foam::List: ";
std::list<vector>::iterator it;
for (it=stlList.begin(); it != stlList.end(); ++it)
{
Info<< *it << " ";
}
Info<< endl;
List<vector> iteratorSTLList(stlList.begin(), stlList.end());
Info<< " Foam::List constructed from std::list: "
<< iteratorList << endl;
return 0; return 0;
} }
......
...@@ -25,7 +25,6 @@ License ...@@ -25,7 +25,6 @@ License
#include "List.H" #include "List.H"
#include "ListLoopM.H" #include "ListLoopM.H"
#include "FixedList.H" #include "FixedList.H"
#include "PtrList.H" #include "PtrList.H"
#include "SLList.H" #include "SLList.H"
...@@ -189,37 +188,6 @@ Foam::List<T>::List(const UList<T>& a, const labelUList& map) ...@@ -189,37 +188,6 @@ Foam::List<T>::List(const UList<T>& a, const labelUList& map)
} }
template<class T>
template<class InputIterator>
Foam::List<T>::List(InputIterator first, InputIterator last)
{
label s = 0;
for
(
InputIterator iter = first;
iter != last;
++iter
)
{
s++;
}
setSize(s);
s = 0;
for
(
InputIterator iter = first;
iter != last;
++iter
)
{
this->operator[](s++) = *iter;
}
}
template<class T> template<class T>
template<unsigned Size> template<unsigned Size>
Foam::List<T>::List(const FixedList<T, Size>& lst) Foam::List<T>::List(const FixedList<T, Size>& lst)
...@@ -534,6 +502,7 @@ void Foam::List<T>::operator=(const BiIndirectList<T>& lst) ...@@ -534,6 +502,7 @@ void Foam::List<T>::operator=(const BiIndirectList<T>& lst)
} }
} }
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // // * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
#include "ListIO.C" #include "ListIO.C"
......
...@@ -61,8 +61,10 @@ template<class T> Istream& operator>>(Istream&, List<T>&); ...@@ -61,8 +61,10 @@ template<class T> Istream& operator>>(Istream&, List<T>&);
template<class T, unsigned Size> class FixedList; template<class T, unsigned Size> class FixedList;
template<class T> class PtrList; template<class T> class PtrList;
template<class T> class SLList; template<class T> class SLList;
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv> template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
class DynamicList; class DynamicList;
template<class T> class SortableList; template<class T> class SortableList;
template<class T> class IndirectList; template<class T> class IndirectList;
template<class T> class UIndirectList; template<class T> class UIndirectList;
...@@ -120,10 +122,6 @@ public: ...@@ -120,10 +122,6 @@ public:
//- Construct as subset. //- Construct as subset.
List(const UList<T>&, const labelUList& mapAddressing); List(const UList<T>&, const labelUList& mapAddressing);
//- Construct given start and end iterators.
template<class InputIterator>
List(InputIterator first, InputIterator last);
//- Construct as copy of FixedList<T, Size> //- Construct as copy of FixedList<T, Size>
template<unsigned Size> template<unsigned Size>
explicit List(const FixedList<T, Size>&); explicit List(const FixedList<T, Size>&);
...@@ -262,7 +260,7 @@ List<T> readList(Istream&); ...@@ -262,7 +260,7 @@ List<T> readList(Istream&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ListI.H" #include "ListI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
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