diff options
Diffstat (limited to 'src/SetChunkData.cpp')
-rw-r--r-- | src/SetChunkData.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp index 19448147a..d27e53d1c 100644 --- a/src/SetChunkData.cpp +++ b/src/SetChunkData.cpp @@ -131,7 +131,7 @@ void cSetChunkData::RemoveInvalidBlockEntities(void) { for (cBlockEntities::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end();) { - cBlockEntity * BlockEntity = itr->second; + auto & BlockEntity = itr->second; BLOCKTYPE EntityBlockType = BlockEntity->GetBlockType(); BLOCKTYPE WorldBlockType = m_ChunkData.GetBlock({BlockEntity->GetRelX(), BlockEntity->GetPosY(), BlockEntity->GetRelZ()}); if (EntityBlockType != WorldBlockType) @@ -142,7 +142,6 @@ void cSetChunkData::RemoveInvalidBlockEntities(void) ItemTypeToString(EntityBlockType), EntityBlockType, ItemTypeToString(WorldBlockType), WorldBlockType ); - delete BlockEntity; itr = m_BlockEntities.erase(itr); } else |