diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-30 09:51:54 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-30 09:51:54 -0500 |
commit | 6c7fd1db481ff10a16ecab958c6542784fa60b9c (patch) | |
tree | e0162f930ec44a7c53b07061311d52910c36e481 /test/test_common.hpp | |
parent | 8dcb1de91e15ff7fc66279cd9cd9ad8a70f624e0 (diff) |
Use std::byte* instead of void* for allocators.
Diffstat (limited to 'test/test_common.hpp')
-rw-r--r-- | test/test_common.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
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}; |