Removed use of new/delete, switched to use allocator instead.

This commit is contained in:
Branimir Karadžić
2017-11-14 22:09:52 -08:00
parent d90e26f6d0
commit 493c559e8a
8 changed files with 35 additions and 22 deletions

View File

@@ -21,14 +21,16 @@ uintptr_t ptrToBits(void* _ptr)
TEST_CASE("SpSc", "")
{
bx::SpScUnboundedQueue queue;
bx::DefaultAllocator allocator;
bx::SpScUnboundedQueue queue(&allocator);
queue.push(bitsToPtr(0xdeadbeef) );
REQUIRE(0xdeadbeef == ptrToBits(queue.pop() ) );
}
TEST_CASE("MpSc", "")
{
bx::MpScUnboundedQueueT<void> queue;
bx::DefaultAllocator allocator;
bx::MpScUnboundedQueueT<void> queue(&allocator);
queue.push(bitsToPtr(0xdeadbeef) );
REQUIRE(0xdeadbeef == ptrToBits(queue.pop() ) );
}