mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 17:06:15 +00:00
fix more missing this->'s to placate clang++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2e376a87de
commit
acf8723b8e
@ -268,7 +268,7 @@ public:
|
|||||||
|
|
||||||
~SmallVectorImpl() {
|
~SmallVectorImpl() {
|
||||||
// Destroy the constructed elements in the vector.
|
// Destroy the constructed elements in the vector.
|
||||||
destroy_range(this->begin(), this->end());
|
this->destroy_range(this->begin(), this->end());
|
||||||
|
|
||||||
// If this wasn't grown from the inline copy, deallocate the old space.
|
// If this wasn't grown from the inline copy, deallocate the old space.
|
||||||
if (!this->isSmall())
|
if (!this->isSmall())
|
||||||
@ -277,7 +277,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
destroy_range(this->begin(), this->end());
|
this->destroy_range(this->begin(), this->end());
|
||||||
this->EndX = this->BeginX;
|
this->EndX = this->BeginX;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,13 +295,13 @@ public:
|
|||||||
|
|
||||||
void resize(unsigned N, const T &NV) {
|
void resize(unsigned N, const T &NV) {
|
||||||
if (N < this->size()) {
|
if (N < this->size()) {
|
||||||
destroy_range(this->begin()+N, this->end());
|
this->destroy_range(this->begin()+N, this->end());
|
||||||
setEnd(this->begin()+N);
|
this->setEnd(this->begin()+N);
|
||||||
} else if (N > this->size()) {
|
} else if (N > this->size()) {
|
||||||
if (this->capacity() < N)
|
if (this->capacity() < N)
|
||||||
this->grow(N);
|
this->grow(N);
|
||||||
construct_range(this->end(), this->begin()+N, NV);
|
construct_range(this->end(), this->begin()+N, NV);
|
||||||
setEnd(this->begin()+N);
|
this->setEnd(this->begin()+N);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void pop_back() {
|
void pop_back() {
|
||||||
setEnd(this->end()-1);
|
this->setEnd(this->end()-1);
|
||||||
this->end()->~T();
|
this->end()->~T();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ public:
|
|||||||
// TODO: NEED To compile time dispatch on whether in_iter is a random access
|
// TODO: NEED To compile time dispatch on whether in_iter is a random access
|
||||||
// iterator to use the fast uninitialized_copy.
|
// iterator to use the fast uninitialized_copy.
|
||||||
std::uninitialized_copy(in_start, in_end, this->end());
|
std::uninitialized_copy(in_start, in_end, this->end());
|
||||||
setEnd(this->end() + NumInputs);
|
this->setEnd(this->end() + NumInputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// append - Add the specified range to the end of the SmallVector.
|
/// append - Add the specified range to the end of the SmallVector.
|
||||||
@ -360,14 +360,14 @@ public:
|
|||||||
|
|
||||||
// Copy the new elements over.
|
// Copy the new elements over.
|
||||||
std::uninitialized_fill_n(this->end(), NumInputs, Elt);
|
std::uninitialized_fill_n(this->end(), NumInputs, Elt);
|
||||||
setEnd(this->end() + NumInputs);
|
this->setEnd(this->end() + NumInputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void assign(unsigned NumElts, const T &Elt) {
|
void assign(unsigned NumElts, const T &Elt) {
|
||||||
clear();
|
clear();
|
||||||
if (this->capacity() < NumElts)
|
if (this->capacity() < NumElts)
|
||||||
this->grow(NumElts);
|
this->grow(NumElts);
|
||||||
setEnd(this->begin()+NumElts);
|
this->setEnd(this->begin()+NumElts);
|
||||||
construct_range(this->begin(), this->end(), Elt);
|
construct_range(this->begin(), this->end(), Elt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,8 +385,8 @@ public:
|
|||||||
// Shift all elts down.
|
// Shift all elts down.
|
||||||
iterator I = std::copy(E, this->end(), S);
|
iterator I = std::copy(E, this->end(), S);
|
||||||
// Drop the last elts.
|
// Drop the last elts.
|
||||||
destroy_range(I, this->end());
|
this->destroy_range(I, this->end());
|
||||||
setEnd(I);
|
this->setEnd(I);
|
||||||
return(N);
|
return(N);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,9 +446,9 @@ public:
|
|||||||
|
|
||||||
// Copy over the elements that we're about to overwrite.
|
// Copy over the elements that we're about to overwrite.
|
||||||
T *OldEnd = this->end();
|
T *OldEnd = this->end();
|
||||||
setEnd(this->end() + NumToInsert);
|
this->setEnd(this->end() + NumToInsert);
|
||||||
size_t NumOverwritten = OldEnd-I;
|
size_t NumOverwritten = OldEnd-I;
|
||||||
uninitialized_copy(I, OldEnd, this->end()-NumOverwritten);
|
this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten);
|
||||||
|
|
||||||
// Replace the overwritten part.
|
// Replace the overwritten part.
|
||||||
std::fill_n(I, NumOverwritten, Elt);
|
std::fill_n(I, NumOverwritten, Elt);
|
||||||
@ -534,7 +534,7 @@ public:
|
|||||||
/// which will only be overwritten.
|
/// which will only be overwritten.
|
||||||
void set_size(unsigned N) {
|
void set_size(unsigned N) {
|
||||||
assert(N <= this->capacity());
|
assert(N <= this->capacity());
|
||||||
setEnd(this->begin() + N);
|
this->setEnd(this->begin() + N);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -570,15 +570,15 @@ void SmallVectorImpl<T>::swap(SmallVectorImpl<T> &RHS) {
|
|||||||
// Copy over the extra elts.
|
// Copy over the extra elts.
|
||||||
if (this->size() > RHS.size()) {
|
if (this->size() > RHS.size()) {
|
||||||
size_t EltDiff = this->size() - RHS.size();
|
size_t EltDiff = this->size() - RHS.size();
|
||||||
uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end());
|
this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end());
|
||||||
RHS.setEnd(RHS.end()+EltDiff);
|
RHS.setEnd(RHS.end()+EltDiff);
|
||||||
destroy_range(this->begin()+NumShared, this->end());
|
this->destroy_range(this->begin()+NumShared, this->end());
|
||||||
setEnd(this->begin()+NumShared);
|
this->setEnd(this->begin()+NumShared);
|
||||||
} else if (RHS.size() > this->size()) {
|
} else if (RHS.size() > this->size()) {
|
||||||
size_t EltDiff = RHS.size() - this->size();
|
size_t EltDiff = RHS.size() - this->size();
|
||||||
uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end());
|
this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end());
|
||||||
setEnd(this->end() + EltDiff);
|
this->setEnd(this->end() + EltDiff);
|
||||||
destroy_range(RHS.begin()+NumShared, RHS.end());
|
this->destroy_range(RHS.begin()+NumShared, RHS.end());
|
||||||
RHS.setEnd(RHS.begin()+NumShared);
|
RHS.setEnd(RHS.begin()+NumShared);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -602,10 +602,10 @@ const SmallVectorImpl<T> &SmallVectorImpl<T>::
|
|||||||
NewEnd = this->begin();
|
NewEnd = this->begin();
|
||||||
|
|
||||||
// Destroy excess elements.
|
// Destroy excess elements.
|
||||||
destroy_range(NewEnd, this->end());
|
this->destroy_range(NewEnd, this->end());
|
||||||
|
|
||||||
// Trim.
|
// Trim.
|
||||||
setEnd(NewEnd);
|
this->setEnd(NewEnd);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,8 +613,8 @@ const SmallVectorImpl<T> &SmallVectorImpl<T>::
|
|||||||
// This allows us to avoid copying them during the grow.
|
// This allows us to avoid copying them during the grow.
|
||||||
if (this->capacity() < RHSSize) {
|
if (this->capacity() < RHSSize) {
|
||||||
// Destroy current elements.
|
// Destroy current elements.
|
||||||
destroy_range(this->begin(), this->end());
|
this->destroy_range(this->begin(), this->end());
|
||||||
setEnd(this->begin());
|
this->setEnd(this->begin());
|
||||||
CurSize = 0;
|
CurSize = 0;
|
||||||
this->grow(RHSSize);
|
this->grow(RHSSize);
|
||||||
} else if (CurSize) {
|
} else if (CurSize) {
|
||||||
@ -623,10 +623,11 @@ const SmallVectorImpl<T> &SmallVectorImpl<T>::
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copy construct the new elements in place.
|
// Copy construct the new elements in place.
|
||||||
uninitialized_copy(RHS.begin()+CurSize, RHS.end(), this->begin()+CurSize);
|
this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(),
|
||||||
|
this->begin()+CurSize);
|
||||||
|
|
||||||
// Set end.
|
// Set end.
|
||||||
setEnd(this->begin()+RHSSize);
|
this->setEnd(this->begin()+RHSSize);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user