diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-04-27 17:11:56 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-04-27 17:11:56 +0200 |
commit | d412630904c1de6c0d9ef00fbc75b5558f931e8b (patch) | |
tree | c44fc16863072c077b8aaa7a1c9ca1331a9dc266 /src/ChunkBuffer.h | |
parent | Added other half of implementation (diff) | |
download | cuberite-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 'src/ChunkBuffer.h')
-rw-r--r-- | src/ChunkBuffer.h | 7 |
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; }; |