mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 690670, part 0: Add helpers for copy-constructing auto arrays from regular arrays. r=roc
--HG-- extra : rebase_source : e586553e4a2cf344f72347e195f42762f0183c99
This commit is contained in:
parent
ed065074ae
commit
31b4fa2a5b
@ -1284,6 +1284,11 @@ class nsAutoTArray : public nsAutoArrayBase<nsTArray<E, Alloc>, N>
|
||||
{
|
||||
public:
|
||||
nsAutoTArray() {}
|
||||
|
||||
template<typename Allocator>
|
||||
nsAutoTArray(const nsTArray<E, Allocator>& other) {
|
||||
AppendElements(other);
|
||||
}
|
||||
};
|
||||
|
||||
template<class E, PRUint32 N>
|
||||
@ -1291,6 +1296,11 @@ class AutoFallibleTArray : public nsAutoArrayBase<FallibleTArray<E>, N>
|
||||
{
|
||||
public:
|
||||
AutoFallibleTArray() {}
|
||||
|
||||
template<typename Allocator>
|
||||
AutoFallibleTArray(const nsTArray<E, Allocator>& other) {
|
||||
AppendElements(other);
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(MOZALLOC_HAVE_XMALLOC)
|
||||
@ -1299,6 +1309,11 @@ class AutoInfallibleTArray : public nsAutoArrayBase<InfallibleTArray<E>, N>
|
||||
{
|
||||
public:
|
||||
AutoInfallibleTArray() {}
|
||||
|
||||
template<typename Allocator>
|
||||
AutoInfallibleTArray(const nsTArray<E, Allocator>& other) {
|
||||
AppendElements(other);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user