summaryrefslogtreecommitdiff
path: root/source/fud_allocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_allocator.cpp')
-rw-r--r--source/fud_allocator.cpp8
1 files changed, 5 insertions, 3 deletions
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<void*, FudStatus> 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<void>(bytes);
- static_cast<void>(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<const Allocator*>(this);
}