mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 23:29:22 +00:00
add a new assign method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f06f35e30b
commit
1c567b5d92
@ -146,6 +146,15 @@ public:
|
|||||||
End += NumInputs;
|
End += NumInputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void assign(unsigned NumElts, const T &Elt) {
|
||||||
|
clear();
|
||||||
|
if (NumElts > Capacity)
|
||||||
|
grow(NumElts);
|
||||||
|
End = Begin+NumElts;
|
||||||
|
for (; NumElts; --NumElts)
|
||||||
|
new (Begin+NumElts-1) T(Elt);
|
||||||
|
}
|
||||||
|
|
||||||
const SmallVector &operator=(const SmallVector &RHS) {
|
const SmallVector &operator=(const SmallVector &RHS) {
|
||||||
// Avoid self-assignment.
|
// Avoid self-assignment.
|
||||||
if (this == &RHS) return *this;
|
if (this == &RHS) return *this;
|
||||||
|
Loading…
Reference in New Issue
Block a user