зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj
This commit is contained in:
Родитель
69a27ed832
Коммит
4658f7e519
|
@ -2535,6 +2535,13 @@ public:
|
|||
this->AppendElements(aOther);
|
||||
}
|
||||
|
||||
AutoTArray(self_type&& aOther)
|
||||
: nsTArray<E>()
|
||||
{
|
||||
Init();
|
||||
this->SwapElements(aOther);
|
||||
}
|
||||
|
||||
explicit AutoTArray(const base_type& aOther)
|
||||
: mAlign()
|
||||
{
|
||||
|
@ -2569,6 +2576,12 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
self_type& operator=(self_type&& aOther)
|
||||
{
|
||||
base_type::operator=(std::move(aOther));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Allocator>
|
||||
self_type& operator=(const nsTArray_Impl<elem_type, Allocator>& aOther)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче