Fix issue in List
This commit is contained in:
parent
235b36ac47
commit
cea44dc235
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user