summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-05-05 22:38:08 +0200
committerworktycho <work.tycho@gmail.com>2015-05-05 22:38:08 +0200
commitf3101f1d047683a799b4ea439a05d7c7e8fefe86 (patch)
tree6468d564a3b55970210ef5d17cbf7300d4773661 /src/SetChunkData.cpp
parentMerge pull request #1939 from SafwatHalaby/Polising (diff)
parentChanged fabs() to std::abs() (diff)
downloadcuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar.gz
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar.bz2
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar.lz
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar.xz
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.tar.zst
cuberite-f3101f1d047683a799b4ea439a05d7c7e8fefe86.zip
Diffstat (limited to '')
-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
{