mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-11 01:40:05 +00:00
Merge pull request #47 from Jopie64/master
Fix grow size during Array<>::append
This commit is contained in:
commit
7d8f3c261a
2
format.h
2
format.h
@ -315,7 +315,7 @@ template <typename T, std::size_t SIZE>
|
||||
void Array<T, SIZE>::append(const T *begin, const T *end) {
|
||||
std::ptrdiff_t num_elements = end - begin;
|
||||
if (size_ + num_elements > capacity_)
|
||||
Grow(num_elements);
|
||||
Grow(size_ + num_elements);
|
||||
std::copy(begin, end, CheckPtr(ptr_, capacity_) + size_);
|
||||
size_ += num_elements;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user