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 */
|
||||
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 */
|
||||
FastList(const FastList<VALUE>& x) : Base(x) {}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
/** Constructor from a range, passes through to base class */
|
||||
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 */
|
||||
FastMap(const FastMap<KEY,VALUE>& x) : Base(x) {}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
/** Constructor from a range, passes through to base class */
|
||||
template<typename INPUTITERATOR>
|
||||
FastSet(INPUTITERATOR first, INPUTITERATOR last) :
|
||||
explicit FastSet(INPUTITERATOR first, INPUTITERATOR last) :
|
||||
Base(first, last) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ public:
|
|||
FastVector() {}
|
||||
|
||||
/** Constructor from size */
|
||||
FastVector(size_t size) : Base(size) {}
|
||||
explicit FastVector(size_t size) : Base(size) {}
|
||||
|
||||
/** 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 */
|
||||
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 */
|
||||
FastVector(const FastVector<VALUE>& x) : Base(x) {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue