Documentation update.

Fixed crash in flushAll().
This commit is contained in:
David Williams
2011-03-28 19:55:45 +00:00
parent 092d2aa6a0
commit aed8f79aa1
3 changed files with 43 additions and 6 deletions

View File

@ -414,9 +414,11 @@ namespace PolyVox
void Volume<VoxelType>::flushAll()
{
typename std::map<Vector3DInt32, LoadedBlock >::iterator i;
for(i = m_pBlocks.begin(); i != m_pBlocks.end(); i++)
//Replaced the for loop here as the call to
//eraseBlock was invalidating the iterator.
while(m_pBlocks.size() > 0)
{
eraseBlock(i);
eraseBlock(m_pBlocks.begin());
}
}