Holy shit i'm stupid
This commit is contained in:
parent
489e3e0b5e
commit
89243a39b5
|
|
@ -130,10 +130,7 @@ namespace Nz
|
||||||
PlacementNew(&m_ptr[m_size], std::move(*lastElement));
|
PlacementNew(&m_ptr[m_size], std::move(*lastElement));
|
||||||
|
|
||||||
if (&m_ptr[index] < lastElement)
|
if (&m_ptr[index] < lastElement)
|
||||||
{
|
std::move_backward(&m_ptr[index], &m_ptr[m_size - 1], &m_ptr[m_size]);
|
||||||
std::size_t count = m_size - index - 1;
|
|
||||||
std::move_backward(&m_ptr[index], &m_ptr[index + count], &m_ptr[m_size]);
|
|
||||||
}
|
|
||||||
|
|
||||||
PlacementDestroy(&m_ptr[index]);
|
PlacementDestroy(&m_ptr[index]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue