From ee939cf8c86eb1d855bcf1c89038a709f350c84c Mon Sep 17 00:00:00 2001 From: worktycho Date: Tue, 5 May 2015 22:08:40 +0100 Subject: Revert "Small code cleanup" --- src/SetChunkData.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/SetChunkData.cpp') diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp index 7549b0dbf..f2b58570d 100644 --- a/src/SetChunkData.cpp +++ b/src/SetChunkData.cpp @@ -103,7 +103,7 @@ void cSetChunkData::CalculateHeightMap(void) int index = cChunkDef::MakeIndexNoCheck(x, y, z); if (m_BlockTypes[index] != E_BLOCK_AIR) { - m_HeightMap[x + z * cChunkDef::Width] = static_cast(y); + m_HeightMap[x + z * cChunkDef::Width] = (HEIGHTTYPE)y; break; } } // for y @@ -131,8 +131,11 @@ void cSetChunkData::RemoveInvalidBlockEntities(void) ItemTypeToString(EntityBlockType).c_str(), EntityBlockType, ItemTypeToString(WorldBlockType).c_str(), WorldBlockType ); + cBlockEntityList::iterator itr2 = itr; + ++itr2; delete *itr; - itr = m_BlockEntities.erase(itr); + m_BlockEntities.erase(itr); + itr = itr2; } else { -- cgit v1.2.3