mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-17 15:38:40 +00:00
Add 2nd form of resize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70e674e95e
commit
181c359c9d
@ -124,6 +124,18 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resize(unsigned N, const T &NV) {
|
||||||
|
if (N < size()) {
|
||||||
|
destroy_range(Begin+N, End);
|
||||||
|
End = Begin+N;
|
||||||
|
} else if (N > size()) {
|
||||||
|
if (Begin+N > Capacity)
|
||||||
|
grow(N);
|
||||||
|
construct_range(End, Begin+N, NV);
|
||||||
|
End = Begin+N;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void swap(SmallVectorImpl &RHS);
|
void swap(SmallVectorImpl &RHS);
|
||||||
|
|
||||||
/// append - Add the specified range to the end of the SmallVector.
|
/// append - Add the specified range to the end of the SmallVector.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user