summaryrefslogtreecommitdiffstats
path: root/src/ChunkData.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-21 22:18:14 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-21 22:18:14 +0200
commit88c61a2e96af9c7d1b173c0b580cef2c348850d7 (patch)
treef2373625d83aca8b5455fd4f36e6718f5c1dd273 /src/ChunkData.cpp
parentAdded space to ChunkData.cpp (diff)
downloadcuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar.gz
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar.bz2
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar.lz
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar.xz
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.tar.zst
cuberite-88c61a2e96af9c7d1b173c0b580cef2c348850d7.zip
Diffstat (limited to 'src/ChunkData.cpp')
-rw-r--r--src/ChunkData.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp
index f8c4a851d..0cacaf02d 100644
--- a/src/ChunkData.cpp
+++ b/src/ChunkData.cpp
@@ -7,7 +7,7 @@ cChunkData cChunkData::Copy() const
cChunkData copy;
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
- if(m_Sections[i] == NULL)
+ if(m_Sections[i] != NULL)
{
copy.m_Sections[i] = Allocate();
*copy.m_Sections[i] = *m_Sections[i];
@@ -30,7 +30,7 @@ void cChunkData::CopyBlocks (BLOCKTYPE * a_dest, size_t a_Idx, size_t length)
{
size_t tocopy = length > segment_length ? segment_length : length;
length -= tocopy;
- if(m_Sections[i] == NULL)
+ if(m_Sections[i] != NULL)
{
memcpy(
&a_dest[i * segment_length],
@@ -59,7 +59,7 @@ void cChunkData::CopyMeta(NIBBLETYPE * a_dest) const
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if(m_Sections[i] == NULL)
+ if(m_Sections[i] != NULL)
{
memcpy(
&a_dest[i * segment_length],
@@ -86,7 +86,7 @@ void cChunkData::CopyLight(NIBBLETYPE * a_dest) const
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if(m_Sections[i] == NULL)
+ if(m_Sections[i] != NULL)
{
memcpy(
&a_dest[i * segment_length],
@@ -114,7 +114,7 @@ void cChunkData::CopySkyLight(NIBBLETYPE * a_dest) const
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if(m_Sections[i] == NULL)
+ if(m_Sections[i] != NULL)
{
memcpy(
&a_dest[i * segment_length],
@@ -142,7 +142,7 @@ void cChunkData::SetBlocks(const BLOCKTYPE * a_src)
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16;
- if (m_Sections[i] == NULL)
+ if (m_Sections[i] != NULL)
{
memcpy(
&m_Sections[i]->m_BlockTypes,
@@ -196,7 +196,7 @@ void cChunkData::SetMeta(const NIBBLETYPE * a_src)
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if (m_Sections[i] == NULL)
+ if (m_Sections[i] != NULL)
{
memcpy(
&m_Sections[i]->m_BlockMeta,
@@ -251,7 +251,7 @@ void cChunkData::SetLight(const NIBBLETYPE * a_src)
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if (m_Sections[i] == NULL)
+ if (m_Sections[i] != NULL)
{
memcpy(
&m_Sections[i]->m_BlockLight,
@@ -306,7 +306,7 @@ void cChunkData::SetSkyLight (const NIBBLETYPE * a_src)
for (size_t i = 0; i < CHUNK_SECTION_NUM; i++)
{
const size_t segment_length = CHUNK_SECTION_HEIGHT * 16 * 16 / 2;
- if (m_Sections[i] == NULL)
+ if (m_Sections[i] != NULL)
{
memcpy(
&m_Sections[i]->m_BlockSkyLight,