mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1293666 - Add initializer_list ctor to AutoTArray. r=froydnj
MozReview-Commit-ID: 8ORBttWN2Rj --HG-- extra : rebase_source : 9ad6ae8aff9cbc81c773297d0bb2f7478fb3516e
This commit is contained in:
parent
ca9b247d0a
commit
18b7a1fc2f
@ -4452,8 +4452,7 @@ nsDocShell::RemoveFromSessionHistory()
|
||||
|
||||
int32_t index = 0;
|
||||
sessionHistory->GetIndex(&index);
|
||||
AutoTArray<uint64_t, 16> ids;
|
||||
ids.AppendElement(mHistoryID);
|
||||
AutoTArray<uint64_t, 16> ids({mHistoryID});
|
||||
internalHistory->RemoveEntries(ids, index);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -255,8 +255,7 @@ Blob::ToFile()
|
||||
already_AddRefed<File>
|
||||
Blob::ToFile(const nsAString& aName, ErrorResult& aRv) const
|
||||
{
|
||||
AutoTArray<RefPtr<BlobImpl>, 1> blobImpls;
|
||||
blobImpls.AppendElement(mImpl);
|
||||
AutoTArray<RefPtr<BlobImpl>, 1> blobImpls({mImpl});
|
||||
|
||||
nsAutoString contentType;
|
||||
mImpl->GetType(contentType);
|
||||
|
@ -2216,6 +2216,12 @@ public:
|
||||
this->SwapElements(aOther);
|
||||
}
|
||||
|
||||
MOZ_IMPLICIT AutoTArray(std::initializer_list<E> aIL)
|
||||
{
|
||||
Init();
|
||||
this->AppendElements(aIL.begin(), aIL.size());
|
||||
}
|
||||
|
||||
self_type& operator=(const self_type& aOther)
|
||||
{
|
||||
base_type::operator=(aOther);
|
||||
|
Loading…
Reference in New Issue
Block a user