Update StableVector
This commit is contained in:
@@ -266,8 +266,19 @@ namespace OpenVulkano
|
|||||||
return; // return? or make
|
return; // return? or make
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lastChunk->m_data[m_lastChunk->m_nextIndex - 1].~T();
|
if (m_lastChunk->m_nextIndex == 1 && m_lastChunk != m_firstChunk)
|
||||||
m_lastChunk->m_occupiedIndices[m_lastChunk->m_nextIndex - 1] = false;
|
{
|
||||||
|
VectorChunk* temp = m_lastChunk;
|
||||||
|
m_lastChunk = m_lastChunk->m_prev;
|
||||||
|
m_lastChunk->m_next = nullptr;
|
||||||
|
temp->~VectorChunk();
|
||||||
|
::operator delete(temp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_lastChunk->m_nextIndex--;
|
||||||
|
m_lastChunk->m_data[m_lastChunk->m_nextIndex].~T();
|
||||||
|
m_lastChunk->m_occupiedIndices[m_lastChunk->m_nextIndex] = false;
|
||||||
m_lastChunk->m_size--;
|
m_lastChunk->m_size--;
|
||||||
m_lastChunk->m_gapCount++;
|
m_lastChunk->m_gapCount++;
|
||||||
m_size--;
|
m_size--;
|
||||||
|
|||||||
Reference in New Issue
Block a user