From 436e8d479cf85d0b4a2474670193f63ba248c26c Mon Sep 17 00:00:00 2001 From: David Williams Date: Fri, 3 Oct 2014 21:47:04 +0200 Subject: [PATCH] Compile fix. --- library/PolyVoxCore/include/PolyVoxCore/PagedVolume.inl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/PagedVolume.inl b/library/PolyVoxCore/include/PolyVoxCore/PagedVolume.inl index 28babf13..6ee86f1c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/PagedVolume.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/PagedVolume.inl @@ -454,11 +454,13 @@ namespace PolyVox { for(int32_t z = v3dStart.getZ(); z <= v3dEnd.getZ(); z++) { - m_pRecentlyUsedChunks.erase(Vector3DInt32(x, y, z)); m_pLastAccessedChunk = 0; + m_pRecentlyUsedChunks.erase(Vector3DInt32(x, y, z)); } } } + m_pLastAccessedChunk = nullptr; + // We might now have so null pointers in the 'all chunks' list so clean them up. purgeNullPtrsFromAllChunks(); } @@ -482,7 +484,7 @@ namespace PolyVox m_uTimestamper = 0; m_v3dLastAccessedChunkPos = Vector3DInt32(0,0,0); //There are no invalid positions, but initially the m_pLastAccessedChunk pointer will be null; - m_pLastAccessedChunk = 0; + m_pLastAccessedChunk = nullptr; //Compute the chunk side length m_uChunkSideLengthPower = logBase2(m_uChunkSideLength);