llvm.org GIT mirror llvm / c917023
[NFC] Fix SmallVector::append comments Fix the copy-pasted comment. Remove low-value comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362120 91177308-0d34-0410-b5e6-96231b3b80d8 Jan Korous 4 months ago
1 changed file(s) with 1 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
385385 std::input_iterator_tag>::value>::type>
386386 void append(in_iter in_start, in_iter in_end) {
387387 size_type NumInputs = std::distance(in_start, in_end);
388 // Grow allocated space if needed.
389388 if (NumInputs > this->capacity() - this->size())
390389 this->grow(this->size()+NumInputs);
391390
392 // Copy the new elements over.
393391 this->uninitialized_copy(in_start, in_end, this->end());
394392 this->set_size(this->size() + NumInputs);
395393 }
396394
397 /// Add the specified range to the end of the SmallVector.
395 /// Append \p NumInputs copies of \p Elt to the end.
398396 void append(size_type NumInputs, const T &Elt) {
399 // Grow allocated space if needed.
400397 if (NumInputs > this->capacity() - this->size())
401398 this->grow(this->size()+NumInputs);
402399
403 // Copy the new elements over.
404400 std::uninitialized_fill_n(this->end(), NumInputs, Elt);
405401 this->set_size(this->size() + NumInputs);
406402 }