summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-10 21:12:36 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-10 21:12:36 +0200
commit01546020fc70a940f2644e9c8f58c26b754bc653 (patch)
tree941244590713ecd676edd2b02c23f5373bc163f0
parentMaybe speed improvements? (diff)
downloadcuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar.gz
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar.bz2
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar.lz
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar.xz
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.tar.zst
cuberite-01546020fc70a940f2644e9c8f58c26b754bc653.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 7b49862f0..ee1531b5c 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -243,21 +243,21 @@ void cChunk::GetAllData(cChunkDataCallback & a_Callback)
std::vector<BLOCKTYPE> Blocks = m_BlockTypes;
Blocks.resize(NumBlocks);
- a_Callback.BlockTypes (Blocks.data());
+ a_Callback.BlockTypes (&Blocks[0]);
std::vector<NIBBLETYPE> Metas = m_BlockMeta;
Metas.resize(NumBlocks / 2);
- a_Callback.BlockMeta (Metas.data());
+ a_Callback.BlockMeta (&Metas[0]);
a_Callback.LightIsValid (m_IsLightValid);
std::vector<NIBBLETYPE> BlockLights = m_BlockLight;
BlockLights.resize(NumBlocks / 2);
- a_Callback.BlockLight (BlockLights.data());
+ a_Callback.BlockLight (&BlockLights[0]);
std::vector<NIBBLETYPE> BlockSkyLights = m_BlockSkyLight;
BlockSkyLights.resize(NumBlocks / 2, 0xff);
- a_Callback.BlockSkyLight(BlockSkyLights.data());
+ a_Callback.BlockSkyLight(&BlockSkyLights[0]);
for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr)
{
@@ -424,7 +424,7 @@ void cChunk::GetBlockTypes(BLOCKTYPE * a_BlockTypes)
std::vector<BLOCKTYPE> Blocks = m_BlockTypes;
Blocks.resize(NumBlocks);
- memcpy(a_BlockTypes, Blocks.data(), NumBlocks);
+ memcpy(a_BlockTypes, &Blocks[0], NumBlocks);
}