summaryrefslogtreecommitdiffstats
path: root/src/ChunkBuffer.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-27 17:11:56 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-27 17:11:56 +0200
commitd412630904c1de6c0d9ef00fbc75b5558f931e8b (patch)
treec44fc16863072c077b8aaa7a1c9ca1331a9dc266 /src/ChunkBuffer.h
parentAdded other half of implementation (diff)
downloadcuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar.gz
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar.bz2
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar.lz
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar.xz
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.tar.zst
cuberite-d412630904c1de6c0d9ef00fbc75b5558f931e8b.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkBuffer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ChunkBuffer.h b/src/ChunkBuffer.h
index a6a6da013..c23f8971d 100644
--- a/src/ChunkBuffer.h
+++ b/src/ChunkBuffer.h
@@ -30,7 +30,7 @@ public:
#endif
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
- if(m_Sections[i]) delete m_Sections[i];
+ if(m_Sections[i]) Free(m_Sections[i]);;
}
}
@@ -52,7 +52,7 @@ public:
{
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
- if(m_Sections[i]) delete m_Sections[i];
+ if(m_Sections[i]) Free(m_Sections[i]);;
}
}
IsOwner = true;
@@ -76,7 +76,7 @@ public:
{
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
- if(m_Sections[i]) delete m_Sections[i];
+ if(m_Sections[i]) Free(m_Sections[i]);;
m_Sections[i] = other.m_Sections[i];
}
}
@@ -239,6 +239,7 @@ private:
sChunkSection *m_Sections[CHUNK_SECTION_NUM];
sChunkSection * Allocate() const;
+ void Free(sChunkSection * ptr) const;
};