Fix issue in List

This commit is contained in:
Daniel Chappuis 2018-04-03 22:45:20 +02:00
parent 235b36ac47
commit cea44dc235

View File

@ -273,7 +273,7 @@ class List {
// Move the elements to fill in the empty slot
char* dest = static_cast<char*>(mBuffer) + index * sizeof(T);
char* src = dest + sizeof(T);
std::memcpy(static_cast<void*>(dest), static_cast<void*>(src), (mSize - index) * sizeof(T));
std::memmove(static_cast<void*>(dest), static_cast<void*>(src), (mSize - index) * sizeof(T));
}
// Return an iterator pointing to the element after the removed one