Bug 815671 part 10. Make nsTArray constructors explicit. r=jlebar

This commit is contained in:
Boris Zbarsky 2012-11-29 11:14:14 -05:00
parent 7d463ea49d
commit 3adcd6d60f

View File

@ -454,12 +454,12 @@ public:
// The array's copy-constructor performs a 'deep' copy of the given array.
// @param other The array object to copy.
nsTArray(const self_type& other) {
explicit nsTArray(const self_type& other) {
AppendElements(other);
}
template<typename Allocator>
nsTArray(const nsTArray<E, Allocator>& other) {
explicit nsTArray(const nsTArray<E, Allocator>& other) {
AppendElements(other);
}
@ -473,7 +473,8 @@ public:
// Return true if this array has the same length and the same
// elements as |other|.
bool operator==(const self_type& other) const {
template<typename Allocator>
bool operator==(const nsTArray<E, Allocator>& other) const {
size_type len = Length();
if (len != other.Length())
return false;