Lines Matching refs:this
81 void setEnd(T *P) { this->EndX = P; } in setEnd()
98 iterator begin() { return (iterator)this->BeginX; } in begin()
99 const_iterator begin() const { return (const_iterator)this->BeginX; } in begin()
100 iterator end() { return (iterator)this->EndX; } in end()
101 const_iterator end() const { return (const_iterator)this->EndX; } in end()
103 iterator capacity_ptr() { return (iterator)this->CapacityX; } in capacity_ptr()
104 const_iterator capacity_ptr() const { return (const_iterator)this->CapacityX;} in capacity_ptr()
176 if (this->EndX < this->CapacityX) { in push_back()
178 new (this->end()) T(Elt); in push_back()
179 this->setEnd(this->end()+1); in push_back()
182 this->grow(); in push_back()
187 this->setEnd(this->end()-1); in pop_back()
188 this->end()->~T(); in pop_back()
195 size_t CurCapacity = this->capacity(); in grow()
196 size_t CurSize = this->size(); in grow()
203 this->uninitialized_copy(this->begin(), this->end(), NewElts); in grow()
206 destroy_range(this->begin(), this->end()); in grow()
209 if (!this->isSmall()) in grow()
210 free(this->begin()); in grow()
212 this->setEnd(NewElts+CurSize); in grow()
213 this->BeginX = NewElts; in grow()
214 this->CapacityX = this->begin()+NewCapacity; in grow()
249 this->grow_pod(MinSize*sizeof(T), sizeof(T));
253 if (this->EndX < this->CapacityX) { in push_back()
255 *this->end() = Elt; in push_back()
256 this->setEnd(this->end()+1); in push_back()
259 this->grow(); in push_back()
264 this->setEnd(this->end()-1); in pop_back()
290 this->destroy_range(this->begin(), this->end()); in ~SmallVectorImpl()
293 if (!this->isSmall()) in ~SmallVectorImpl()
294 free(this->begin()); in ~SmallVectorImpl()
299 this->destroy_range(this->begin(), this->end()); in clear()
300 this->EndX = this->BeginX; in clear()
304 if (N < this->size()) { in resize()
305 this->destroy_range(this->begin()+N, this->end()); in resize()
306 this->setEnd(this->begin()+N); in resize()
307 } else if (N > this->size()) { in resize()
308 if (this->capacity() < N) in resize()
309 this->grow(N); in resize()
310 std::uninitialized_fill(this->end(), this->begin()+N, T()); in resize()
311 this->setEnd(this->begin()+N); in resize()
316 if (N < this->size()) { in resize()
317 this->destroy_range(this->begin()+N, this->end()); in resize()
318 this->setEnd(this->begin()+N); in resize()
319 } else if (N > this->size()) { in resize()
320 if (this->capacity() < N) in resize()
321 this->grow(N); in resize()
322 std::uninitialized_fill(this->end(), this->begin()+N, NV); in resize()
323 this->setEnd(this->begin()+N); in resize()
328 if (this->capacity() < N) in reserve()
329 this->grow(N); in reserve()
333 T Result = this->back(); in pop_back_val()
334 this->pop_back(); in pop_back_val()
346 if (NumInputs > size_type(this->capacity_ptr()-this->end())) in append()
347 this->grow(this->size()+NumInputs); in append()
352 std::uninitialized_copy(in_start, in_end, this->end()); in append()
353 this->setEnd(this->end() + NumInputs); in append()
360 if (NumInputs > size_type(this->capacity_ptr()-this->end())) in append()
361 this->grow(this->size()+NumInputs); in append()
364 std::uninitialized_fill_n(this->end(), NumInputs, Elt); in append()
365 this->setEnd(this->end() + NumInputs); in append()
370 if (this->capacity() < NumElts) in assign()
371 this->grow(NumElts); in assign()
372 this->setEnd(this->begin()+NumElts); in assign()
373 std::uninitialized_fill(this->begin(), this->end(), Elt); in assign()
379 std::copy(I+1, this->end(), I); in erase()
381 this->pop_back(); in erase()
388 iterator I = std::copy(E, this->end(), S); in erase()
390 this->destroy_range(I, this->end()); in erase()
391 this->setEnd(I); in erase()
396 if (I == this->end()) { // Important special case for empty vector. in insert()
397 this->push_back(Elt); in insert()
398 return this->end()-1; in insert()
401 if (this->EndX < this->CapacityX) { in insert()
403 new (this->end()) T(this->back()); in insert()
404 this->setEnd(this->end()+1); in insert()
406 std::copy_backward(I, this->end()-1, this->end()); in insert()
411 if (I <= EltPtr && EltPtr < this->EndX) in insert()
417 size_t EltNo = I-this->begin(); in insert()
418 this->grow(); in insert()
419 I = this->begin()+EltNo; in insert()
424 if (I == this->end()) { // Important special case for empty vector. in insert()
426 return this->end()-1; in insert()
430 size_t InsertElt = I - this->begin(); in insert()
433 reserve(static_cast<unsigned>(this->size() + NumToInsert)); in insert()
436 I = this->begin()+InsertElt; in insert()
442 if (size_t(this->end()-I) >= NumToInsert) { in insert()
443 T *OldEnd = this->end(); in insert()
444 append(this->end()-NumToInsert, this->end()); in insert()
457 T *OldEnd = this->end(); in insert()
458 this->setEnd(this->end() + NumToInsert); in insert()
460 this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); in insert()
472 if (I == this->end()) { // Important special case for empty vector. in insert()
474 return this->end()-1; in insert()
479 size_t InsertElt = I - this->begin(); in insert()
482 reserve(static_cast<unsigned>(this->size() + NumToInsert)); in insert()
485 I = this->begin()+InsertElt; in insert()
491 if (size_t(this->end()-I) >= NumToInsert) { in insert()
492 T *OldEnd = this->end(); in insert()
493 append(this->end()-NumToInsert, this->end()); in insert()
506 T *OldEnd = this->end(); in insert()
507 this->setEnd(this->end() + NumToInsert); in insert()
509 this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten); in insert()
518 this->uninitialized_copy(From, To, OldEnd); in insert()
526 if (this->size() != RHS.size()) return false;
527 return std::equal(this->begin(), this->end(), RHS.begin());
530 return !(*this == RHS);
534 return std::lexicographical_compare(this->begin(), this->end(),
548 assert(N <= this->capacity()); in set_size()
549 this->setEnd(this->begin() + N); in set_size()
556 if (this == &RHS) return; in swap()
559 if (!this->isSmall() && !RHS.isSmall()) { in swap()
560 std::swap(this->BeginX, RHS.BeginX); in swap()
561 std::swap(this->EndX, RHS.EndX); in swap()
562 std::swap(this->CapacityX, RHS.CapacityX); in swap()
565 if (RHS.size() > this->capacity()) in swap()
566 this->grow(RHS.size()); in swap()
567 if (this->size() > RHS.capacity()) in swap()
568 RHS.grow(this->size()); in swap()
571 size_t NumShared = this->size(); in swap()
574 std::swap((*this)[i], RHS[i]); in swap()
577 if (this->size() > RHS.size()) { in swap()
578 size_t EltDiff = this->size() - RHS.size(); in swap()
579 this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end()); in swap()
581 this->destroy_range(this->begin()+NumShared, this->end()); in swap()
582 this->setEnd(this->begin()+NumShared); in swap()
583 } else if (RHS.size() > this->size()) { in swap()
584 size_t EltDiff = RHS.size() - this->size(); in swap()
585 this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end()); in swap()
586 this->setEnd(this->end() + EltDiff); in swap()
587 this->destroy_range(RHS.begin()+NumShared, RHS.end()); in swap()
596 if (this == &RHS) return *this;
601 size_t CurSize = this->size();
606 NewEnd = std::copy(RHS.begin(), RHS.begin()+RHSSize, this->begin());
608 NewEnd = this->begin();
611 this->destroy_range(NewEnd, this->end());
614 this->setEnd(NewEnd);
615 return *this;
620 if (this->capacity() < RHSSize) {
622 this->destroy_range(this->begin(), this->end());
623 this->setEnd(this->begin());
625 this->grow(RHSSize);
628 std::copy(RHS.begin(), RHS.begin()+CurSize, this->begin());
632 this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(),
633 this->begin()+CurSize);
636 this->setEnd(this->begin()+RHSSize);
637 return *this;
677 this->assign(Size, Value);
682 this->append(S, E); in SmallVector()
692 return *this;
707 this->assign(Size, Value);
712 this->append(S, E); in SmallVector()