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_utf8.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_utf8.cpp') diff --git a/test/test_utf8.cpp b/test/test_utf8.cpp index 591d1a3..69a1643 100644 --- a/test/test_utf8.cpp +++ b/test/test_utf8.cpp @@ -127,17 +127,17 @@ TEST(Utf8Test, Utf8MultiByte) constexpr size_t bufSize = data.size(); EXPECT_EQ(data[bufSize - 1], '\0'); - class FixedAllocator final : public Allocator { + class FixedAllocator : public Allocator { private: - Array m_memory{}; + Array m_memory{}; size_t m_allocated{0}; public: - virtual ~FixedAllocator() override final = default; + virtual ~FixedAllocator() override = default; - virtual Result allocate(size_t bytes, size_t alignment) override final + virtual Result allocate(size_t bytes, size_t alignment) override final { - using RetType = Result; + using RetType = Result; static_cast(alignment); if (bytes > m_memory.size() - m_allocated) { return RetType::error(FudStatus::AllocFailure); @@ -147,7 +147,7 @@ TEST(Utf8Test, Utf8MultiByte) return RetType::okay(data); } - virtual FudStatus deallocate(void* pointer, size_t bytes) override final + virtual FudStatus deallocate(std::byte* pointer, size_t bytes) override final { static_cast(pointer); static_cast(bytes); -- cgit v1.2.3