Made Fast* container constructors explicit (like the STL versions) to prevent bugs
parent
0ba97cc39a
commit
aa31be1649
|
|
@ -43,7 +43,7 @@ public:
|
||||||
|
|
||||||
/** Constructor from a range, passes through to base class */
|
/** Constructor from a range, passes through to base class */
|
||||||
template<typename INPUTITERATOR>
|
template<typename INPUTITERATOR>
|
||||||
FastList(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
explicit FastList(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
||||||
|
|
||||||
/** Copy constructor from another FastList */
|
/** Copy constructor from another FastList */
|
||||||
FastList(const FastList<VALUE>& x) : Base(x) {}
|
FastList(const FastList<VALUE>& x) : Base(x) {}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public:
|
||||||
|
|
||||||
/** Constructor from a range, passes through to base class */
|
/** Constructor from a range, passes through to base class */
|
||||||
template<typename INPUTITERATOR>
|
template<typename INPUTITERATOR>
|
||||||
FastMap(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
explicit FastMap(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
||||||
|
|
||||||
/** Copy constructor from another FastMap */
|
/** Copy constructor from another FastMap */
|
||||||
FastMap(const FastMap<KEY,VALUE>& x) : Base(x) {}
|
FastMap(const FastMap<KEY,VALUE>& x) : Base(x) {}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public:
|
||||||
|
|
||||||
/** Constructor from a range, passes through to base class */
|
/** Constructor from a range, passes through to base class */
|
||||||
template<typename INPUTITERATOR>
|
template<typename INPUTITERATOR>
|
||||||
FastSet(INPUTITERATOR first, INPUTITERATOR last) :
|
explicit FastSet(INPUTITERATOR first, INPUTITERATOR last) :
|
||||||
Base(first, last) {
|
Base(first, last) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,14 +41,14 @@ public:
|
||||||
FastVector() {}
|
FastVector() {}
|
||||||
|
|
||||||
/** Constructor from size */
|
/** Constructor from size */
|
||||||
FastVector(size_t size) : Base(size) {}
|
explicit FastVector(size_t size) : Base(size) {}
|
||||||
|
|
||||||
/** Constructor from size and initial values */
|
/** Constructor from size and initial values */
|
||||||
FastVector(size_t size, const VALUE& initial) : Base(size, initial) {}
|
explicit FastVector(size_t size, const VALUE& initial) : Base(size, initial) {}
|
||||||
|
|
||||||
/** Constructor from a range, passes through to base class */
|
/** Constructor from a range, passes through to base class */
|
||||||
template<typename INPUTITERATOR>
|
template<typename INPUTITERATOR>
|
||||||
FastVector(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
explicit FastVector(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
|
||||||
|
|
||||||
/** Copy constructor from another FastSet */
|
/** Copy constructor from another FastSet */
|
||||||
FastVector(const FastVector<VALUE>& x) : Base(x) {}
|
FastVector(const FastVector<VALUE>& x) : Base(x) {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue