Uncompressed blocks are now flushed before compressed blocks.

This commit is contained in:
David Williams 2013-08-12 21:04:55 +02:00
parent 6fb30a40f5
commit 07f1ca42d2

View File

@ -435,8 +435,14 @@ namespace PolyVox
void LargeVolume<VoxelType>::flushAll()
{
typename CompressedBlockMap::iterator i;
//Replaced the for loop here as the call to
//eraseBlock was invalidating the iterator.
while(m_pUncompressedBlockCache.size() > 0)
{
eraseBlock(m_pUncompressedBlockCache.begin());
}
while(m_pBlocks.size() > 0)
{
eraseBlock(m_pBlocks.begin());