From 8ce397e8c0a83e49e390de9deb73d588e4931ecf Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Tue, 29 Oct 2024 21:02:25 -0500 Subject: Reworking of Result. --- test/test_utf8.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_utf8.cpp') diff --git a/test/test_utf8.cpp b/test/test_utf8.cpp index 5447954..8c3cad2 100644 --- a/test/test_utf8.cpp +++ b/test/test_utf8.cpp @@ -137,13 +137,14 @@ TEST(Utf8Test, Utf8MultiByte) virtual Result allocate(size_t bytes, size_t alignment) override final { + using RetType = Result; static_cast(alignment); if (bytes > m_memory.size() - m_allocated) { - return FudStatus::AllocFailure; + return RetType::error(FudStatus::AllocFailure); } auto* data = m_memory.data() + m_allocated; m_allocated += bytes; - return data; + return RetType::okay(data); } virtual FudStatus deallocate(void* pointer, size_t bytes) override final -- cgit v1.2.3