Move instead of copy in VectorRef::reallocate

This commit is contained in:
tclinken 2020-04-25 12:24:06 -07:00
parent 0efce542c8
commit d654f75c46
1 changed files with 1 additions and 1 deletions

View File

@ -964,7 +964,7 @@ private:
// SOMEDAY: Maybe we are right at the end of the arena and can expand cheaply
T* newData = (T*)new (p) uint8_t[requiredCapacity * sizeof(T)];
if (m_size > 0) {
std::copy(data, data + m_size, newData);
std::move(data, data + m_size, newData);
}
data = newData;
m_capacity = requiredCapacity;