diff options
Diffstat (limited to 'source/fud_allocator.cpp')
-rw-r--r-- | source/fud_allocator.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/fud_allocator.cpp b/source/fud_allocator.cpp index d5127fa..3f58fb0 100644 --- a/source/fud_allocator.cpp +++ b/source/fud_allocator.cpp @@ -30,13 +30,12 @@ Result<std::byte*, FudStatus> FudAllocator::allocate(size_t bytes, size_t alignm return RetType::okay(pointer); } -FudStatus FudAllocator::deallocate(std::byte* pointer, size_t bytes) +void FudAllocator::deallocate(std::byte* pointer, size_t bytes) { if (pointer == nullptr || bytes == 0) { - return FudStatus::ArgumentInvalid; + return; } fudFree(pointer); - return FudStatus::Success; } bool FudAllocator::isEqual(const Allocator& rhs) const @@ -50,14 +49,13 @@ Result<std::byte*, FudStatus> NullAllocator::allocate(size_t bytes, size_t align { static_cast<void>(bytes); static_cast<void>(alignment); - return FudError{FudStatus::Failure}; + return FudError{FudStatus::AllocFailure}; } -FudStatus NullAllocator::deallocate(std::byte* pointer, size_t bytes) +void NullAllocator::deallocate(std::byte* pointer, size_t bytes) { static_cast<void>(pointer); static_cast<void>(bytes); - return FudStatus::Failure; } bool NullAllocator::isEqual(const Allocator& rhs) const |