diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-05-23 18:18:11 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-05-23 18:18:11 +0200 |
commit | 8be3a8f7dc10dbc49dfcdeca572677ef1e00f714 (patch) | |
tree | 204743272c8948237a8322027510f5240bfdb71e /tests/ChunkData/creatable.cpp | |
parent | Use placement new to initalise objects (diff) | |
download | cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar.gz cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar.bz2 cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar.lz cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar.xz cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.tar.zst cuberite-8be3a8f7dc10dbc49dfcdeca572677ef1e00f714.zip |
Diffstat (limited to 'tests/ChunkData/creatable.cpp')
-rw-r--r-- | tests/ChunkData/creatable.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ChunkData/creatable.cpp b/tests/ChunkData/creatable.cpp index 74025cb14..78b1a82d1 100644 --- a/tests/ChunkData/creatable.cpp +++ b/tests/ChunkData/creatable.cpp @@ -4,6 +4,14 @@ int main(int argc, char** argv) { - cChunkData buffer; + class cStarvationCallbacks + : public cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks + { + virtual void OnStartingUsingBuffer() {} + virtual void OnStopUsingBuffer() {} + virtual void OnBufferEmpty() {} + }; + cAllocationPool<cChunkData::sChunkSection,1600> Pool(std::auto_ptr<cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks>(new cStarvationCallbacks())); + cChunkData buffer(Pool); return 0; } |