diff options
Diffstat (limited to 'test/test_common.cpp')
-rw-r--r-- | test/test_common.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_common.cpp b/test/test_common.cpp index 784cb0d..778b4b5 100644 --- a/test/test_common.cpp +++ b/test/test_common.cpp @@ -25,12 +25,12 @@ namespace fud { -void* MockFudAlloc::operator()(size_t size) +std::byte* MockFudAlloc::operator()(size_t size) { - return malloc(size); + return static_cast<std::byte*>(malloc(size)); } -void MockFudDealloc::operator()(void* pointer) +void MockFudDealloc::operator()(std::byte* pointer) { return free(pointer); } @@ -39,24 +39,24 @@ MockFudAlloc globalDefaultMockAlloc{}; MockFudDealloc globalDefaultMockDealloc{}; -void* MockFudAllocator::allocate(size_t size) +std::byte* MockFudAllocator::allocate(size_t size) { return (*m_allocator)(size); } -void MockFudAllocator::deallocate(void* pointer) +void MockFudAllocator::deallocate(std::byte* pointer) { return (*m_deallocator)(pointer); } MockFudAllocator globalMockFudAlloc{}; -void* fudAlloc(size_t size) +std::byte* fudAlloc(size_t size) { return globalMockFudAlloc.allocate(size); } -void fudFree(void* ptr) +void fudFree(std::byte* ptr) { return globalMockFudAlloc.deallocate(ptr); } |