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_utf8.cpp | |
parent | 8dcb1de91e15ff7fc66279cd9cd9ad8a70f624e0 (diff) |
Use std::byte* instead of void* for allocators.
Diffstat (limited to 'test/test_utf8.cpp')
-rw-r--r-- | test/test_utf8.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<utf8, bufSize> m_memory{}; + Array<std::byte, bufSize> m_memory{}; size_t m_allocated{0}; public: - virtual ~FixedAllocator() override final = default; + virtual ~FixedAllocator() override = default; - virtual Result<void*, FudStatus> allocate(size_t bytes, size_t alignment) override final + virtual Result<std::byte*, FudStatus> allocate(size_t bytes, size_t alignment) override final { - using RetType = Result<void*, FudStatus>; + using RetType = Result<std::byte*, FudStatus>; static_cast<void>(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<void>(pointer); static_cast<void>(bytes); |