summaryrefslogtreecommitdiffstats
path: root/src/ChunkData.cpp
diff options
context:
space:
mode:
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,