mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Fix PR3860 by correcting a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
19527c6ef3
commit
dae2206390
@ -293,10 +293,11 @@ public:
|
|||||||
// Uninvalidate the iterator.
|
// Uninvalidate the iterator.
|
||||||
I = begin()+InsertElt;
|
I = begin()+InsertElt;
|
||||||
|
|
||||||
// If we already have this many elements in the collection, append the
|
// If there are more elements between the insertion point and the end of the
|
||||||
// dest elements at the end, then copy over the appropriate elements. Since
|
// range than there are being inserted, we can use a simple approach to
|
||||||
// we already reserved space, we know that this won't reallocate the vector.
|
// insertion. Since we already reserved space, we know that this won't
|
||||||
if (size() >= NumToInsert) {
|
// reallocate the vector.
|
||||||
|
if (size_t(end()-I) >= NumToInsert) {
|
||||||
T *OldEnd = End;
|
T *OldEnd = End;
|
||||||
append(End-NumToInsert, End);
|
append(End-NumToInsert, End);
|
||||||
|
|
||||||
@ -341,10 +342,11 @@ public:
|
|||||||
// Uninvalidate the iterator.
|
// Uninvalidate the iterator.
|
||||||
I = begin()+InsertElt;
|
I = begin()+InsertElt;
|
||||||
|
|
||||||
// If we already have this many elements in the collection, append the
|
// If there are more elements between the insertion point and the end of the
|
||||||
// dest elements at the end, then copy over the appropriate elements. Since
|
// range than there are being inserted, we can use a simple approach to
|
||||||
// we already reserved space, we know that this won't reallocate the vector.
|
// insertion. Since we already reserved space, we know that this won't
|
||||||
if (size() >= NumToInsert) {
|
// reallocate the vector.
|
||||||
|
if (size_t(end()-I) >= NumToInsert) {
|
||||||
T *OldEnd = End;
|
T *OldEnd = End;
|
||||||
append(End-NumToInsert, End);
|
append(End-NumToInsert, End);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user