summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-25 22:22:43 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-25 22:22:43 +0200
commit05f52192c9389f0c28cc6d772f3625c9588273a1 (patch)
treebf1f98b0561dd18fcab90a2b024440f725d4788d /src/Chunk.cpp
parentFixed indent (diff)
downloadcuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar.gz
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar.bz2
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar.lz
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar.xz
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.tar.zst
cuberite-05f52192c9389f0c28cc6d772f3625c9588273a1.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 97a8ba88b..652f56905 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -241,21 +241,21 @@ void cChunk::GetAllData(cChunkDataCallback & a_Callback)
a_Callback.HeightMap (&m_HeightMap);
a_Callback.BiomeData (&m_BiomeMap);
- std::vector<BLOCKTYPE> Blocks = m_BlockTypes;
+ COMPRESSED_BLOCKTYPE Blocks = m_BlockTypes;
Blocks.resize(NumBlocks);
a_Callback.BlockTypes (&Blocks[0]);
- std::vector<NIBBLETYPE> Metas = m_BlockMeta;
+ COMPRESSED_NIBBLETYPE Metas = m_BlockMeta;
Metas.resize(NumBlocks / 2);
a_Callback.BlockMeta (&Metas[0]);
a_Callback.LightIsValid (m_IsLightValid);
- std::vector<NIBBLETYPE> BlockLights = m_BlockLight;
+ COMPRESSED_NIBBLETYPE BlockLights = m_BlockLight;
BlockLights.resize(NumBlocks / 2);
a_Callback.BlockLight (&BlockLights[0]);
- std::vector<NIBBLETYPE> BlockSkyLights = m_BlockSkyLight;
+ COMPRESSED_NIBBLETYPE BlockSkyLights = m_BlockSkyLight;
BlockSkyLights.resize(NumBlocks / 2, 0xff);
a_Callback.BlockSkyLight(&BlockSkyLights[0]);
@@ -1579,7 +1579,7 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
MarkDirty();
- if (m_BlockTypes.empty() || ((size_t)index >= m_BlockTypes.size()))
+ if ((size_t)index >= m_BlockTypes.size())
{
m_BlockTypes.resize(index + 1);
}
@@ -2524,7 +2524,7 @@ BLOCKTYPE cChunk::GetBlock(int a_BlockIdx) const
return 0;
}
- if (m_BlockTypes.empty() || ((size_t)a_BlockIdx >= m_BlockTypes.size()))
+ if ((size_t)a_BlockIdx >= m_BlockTypes.size())
{
return E_BLOCK_AIR;
}