mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
Bug 815671 part 10. Make nsTArray constructors explicit. r=jlebar
This commit is contained in:
parent
7d463ea49d
commit
3adcd6d60f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user