diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-06-14 20:46:34 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-06-14 20:46:34 +0200 |
commit | 94c48febd2f596648fc2616a8a577316a219b581 (patch) | |
tree | 3275d163808851c7413cd9abb5f3019788823fda /src/ChunkMap.cpp | |
parent | reverted accedental android changes (diff) | |
download | cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.gz cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.bz2 cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.lz cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.xz cuberite-94c48febd2f596648fc2616a8a577316a219b581.tar.zst cuberite-94c48febd2f596648fc2616a8a577316a219b581.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 704c4f823..3b946f9ec 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -35,8 +35,14 @@ cChunkMap::cChunkMap(cWorld * a_World ) : m_World( a_World ), - m_Pool(std::auto_ptr<cAllocationPool<cChunkData::sChunkSection, 1600>::cStarvationCallbacks>(new cStarvationCallbacks())) + m_Pool( + new cListAllocationPool<cChunkData::sChunkSection, 1600>( + std::auto_ptr<cAllocationPool<cChunkData::sChunkSection>::cStarvationCallbacks>( + new cStarvationCallbacks()) + ) + ) { + } @@ -79,7 +85,7 @@ cChunkMap::cChunkLayer * cChunkMap::GetLayer(int a_LayerX, int a_LayerZ) } // Not found, create new: - cChunkLayer * Layer = new cChunkLayer(a_LayerX, a_LayerZ, this, m_Pool); + cChunkLayer * Layer = new cChunkLayer(a_LayerX, a_LayerZ, this, *m_Pool); if (Layer == NULL) { LOGERROR("cChunkMap: Cannot create new layer, server out of memory?"); @@ -2672,7 +2678,7 @@ void cChunkMap::QueueTickBlock(int a_BlockX, int a_BlockY, int a_BlockZ) // cChunkMap::cChunkLayer: cChunkMap::cChunkLayer::cChunkLayer(int a_LayerX, int a_LayerZ, cChunkMap * a_Parent, - cAllocationPool<cChunkData::sChunkSection, 1600> & a_Pool) + cAllocationPool<cChunkData::sChunkSection> & a_Pool) : m_LayerX( a_LayerX ) , m_LayerZ( a_LayerZ ) , m_Parent( a_Parent ) |