diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-06-16 16:22:02 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-06-16 16:22:02 +0200 |
commit | d5c84b5fe6358c0763f2b5695914ff34c74dd912 (patch) | |
tree | 96b703b1a7e052f74a8d270fb0278e5acb70435a /tests/ChunkData/Copies.cpp | |
parent | Moved repeater handling to seperate pass (diff) | |
parent | Merge branch 'master' of github.com:mc-server/MCServer (diff) | |
download | cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar.gz cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar.bz2 cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar.lz cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar.xz cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.tar.zst cuberite-d5c84b5fe6358c0763f2b5695914ff34c74dd912.zip |
Diffstat (limited to 'tests/ChunkData/Copies.cpp')
-rw-r--r-- | tests/ChunkData/Copies.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/ChunkData/Copies.cpp b/tests/ChunkData/Copies.cpp index 312441eee..440819e91 100644 --- a/tests/ChunkData/Copies.cpp +++ b/tests/ChunkData/Copies.cpp @@ -6,8 +6,21 @@ int main(int argc, char** argv) { + class cMockAllocationPool + : public cAllocationPool<cChunkData::sChunkSection> + { + virtual cChunkData::sChunkSection * Allocate() + { + return new cChunkData::sChunkSection(); + } + + virtual void Free(cChunkData::sChunkSection * a_Ptr) + { + delete a_Ptr; + } + } Pool; { - cChunkData buffer; + cChunkData buffer(Pool); buffer.SetBlock(3, 1, 4, 0xDE); buffer.SetMeta(3, 1, 4, 0xA); @@ -37,7 +50,7 @@ int main(int argc, char** argv) } { - cChunkData buffer; + cChunkData buffer(Pool); NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2]; for (int i = 0; i < 16 * 16 * 256 / 2; i += 4) @@ -60,7 +73,7 @@ int main(int argc, char** argv) } { - cChunkData buffer; + cChunkData buffer(Pool); NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2]; for (int i = 0; i < 16 * 16 * 256 / 2; i += 4) @@ -83,7 +96,7 @@ int main(int argc, char** argv) } { - cChunkData buffer; + cChunkData buffer(Pool); NIBBLETYPE SrcNibbleBuffer[16 * 16 * 256 / 2]; for (int i = 0; i < 16 * 16 * 256 / 2; i += 4) @@ -106,7 +119,7 @@ int main(int argc, char** argv) } { - cChunkData buffer; + cChunkData buffer(Pool); BLOCKTYPE SrcBlockBuffer[16 * 16 * 256]; memset(SrcBlockBuffer, 0x00, 16 * 16 * 256); |