summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetChunkData.cpp')
-rw-r--r--src/SetChunkData.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp
index f2b58570d..7549b0dbf 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] = (HEIGHTTYPE)y;
+ m_HeightMap[x + z * cChunkDef::Width] = static_cast<HEIGHTTYPE>(y);
break;
}
} // for y
@@ -131,11 +131,8 @@ void cSetChunkData::RemoveInvalidBlockEntities(void)
ItemTypeToString(EntityBlockType).c_str(), EntityBlockType,
ItemTypeToString(WorldBlockType).c_str(), WorldBlockType
);
- cBlockEntityList::iterator itr2 = itr;
- ++itr2;
delete *itr;
- m_BlockEntities.erase(itr);
- itr = itr2;
+ itr = m_BlockEntities.erase(itr);
}
else
{