From 6c7fd1db481ff10a16ecab958c6542784fa60b9c Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 30 Oct 2024 09:51:54 -0500 Subject: Use std::byte* instead of void* for allocators. --- test/test_common.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/test_common.hpp') diff --git a/test/test_common.hpp b/test/test_common.hpp index fd16364..8912e42 100644 --- a/test/test_common.hpp +++ b/test/test_common.hpp @@ -57,23 +57,22 @@ static_assert(sizeof(FOUR_BYTE) == 4 + 1); #define CHARACTER_SET LOWERCASE_CHARS u8" " UPPERCASE_CHARS // NOLINTEND(cppcoreguidelines-macro-usage) -constexpr size_t charSetSize = sizeof(CHARACTER_SET) - 1; struct MockFudAlloc { - virtual void* operator()(size_t size); + virtual std::byte* operator()(size_t size); }; extern MockFudAlloc globalDefaultMockAlloc; struct MockFudDealloc { - virtual void operator()(void* pointer); + virtual void operator()(std::byte* pointer); }; extern MockFudDealloc globalDefaultMockDealloc; struct MockFudAllocator { - void* allocate(size_t size); - void deallocate(void* pointer); + std::byte* allocate(size_t size); + void deallocate(std::byte* pointer); MockFudAlloc* m_allocator{&globalDefaultMockAlloc}; MockFudDealloc* m_deallocator{&globalDefaultMockDealloc}; -- cgit v1.2.3