mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-29 00:35:03 +00:00
parent
c9c5b90da7
commit
31ce6bc702
@ -566,7 +566,7 @@ template <typename U>
|
|||||||
void buffer<T>::append(const U* begin, const U* end) {
|
void buffer<T>::append(const U* begin, const U* end) {
|
||||||
size_t new_size = size_ + to_unsigned(end - begin);
|
size_t new_size = size_ + to_unsigned(end - begin);
|
||||||
reserve(new_size);
|
reserve(new_size);
|
||||||
std::uninitialized_copy(begin, end, make_checked(ptr_, capacity_) + size_);
|
std::uninitialized_copy(begin, end, make_checked(ptr_ + size_, capacity_ - size_));
|
||||||
size_ = new_size;
|
size_ = new_size;
|
||||||
}
|
}
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
Loading…
Reference in New Issue
Block a user