diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-29 21:02:25 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-29 21:02:25 -0500 |
commit | 8ce397e8c0a83e49e390de9deb73d588e4931ecf (patch) | |
tree | 31f4f4facf0cb75535aaec130d606c54fe97b2d8 /test/test_utf8.cpp | |
parent | f281050ddb3b9d658cff67a254eedc3b79de5c5d (diff) |
Reworking of Result.
Diffstat (limited to 'test/test_utf8.cpp')
-rw-r--r-- | test/test_utf8.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<void*, FudStatus> allocate(size_t bytes, size_t alignment) override final { + using RetType = Result<void*, FudStatus>; static_cast<void>(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 |