From 8249b28bea29e8ce17eac12776a60ec3f9e47176 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 17 Oct 2024 19:42:29 -0500 Subject: Rename InvalidInput to ArgumentInvalid. --- source/fud_allocator.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/fud_allocator.cpp') diff --git a/source/fud_allocator.cpp b/source/fud_allocator.cpp index b5af593..1e4117a 100644 --- a/source/fud_allocator.cpp +++ b/source/fud_allocator.cpp @@ -30,16 +30,18 @@ Result FudAllocator::allocate(size_t bytes, size_t alignment) return RetType::okay(pointer); } -void FudAllocator::deallocate(void* pointer, size_t bytes, size_t alignment) +FudStatus FudAllocator::deallocate(void* pointer, size_t bytes) { + if (pointer == nullptr || bytes == 0) { + return FudStatus::ArgumentInvalid; + } static_cast(bytes); - static_cast(alignment); fudFree(pointer); + return FudStatus::Success; } bool FudAllocator::isEqual(const Allocator& rhs) const { - /* Is this legit? Or is this a bogus check? */ return &rhs == static_cast(this); } -- cgit v1.2.3