diff options
Diffstat (limited to 'pw_allocator')
-rw-r--r-- | pw_allocator/freelist_heap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pw_allocator/freelist_heap.cc b/pw_allocator/freelist_heap.cc index 9ff5044e1..7966bb89f 100644 --- a/pw_allocator/freelist_heap.cc +++ b/pw_allocator/freelist_heap.cc @@ -52,7 +52,7 @@ void* FreeListHeap::Allocate(size_t size) { } void FreeListHeap::Free(void* ptr) { - std::byte* bytes = reinterpret_cast<std::byte*>(ptr); + std::byte* bytes = static_cast<std::byte*>(ptr); if (bytes < region_.data() || bytes >= region_.data() + region_.size()) { return; @@ -102,7 +102,7 @@ void* FreeListHeap::Realloc(void* ptr, size_t size) { return Allocate(size); } - std::byte* bytes = reinterpret_cast<std::byte*>(ptr); + std::byte* bytes = static_cast<std::byte*>(ptr); // TODO(chenghanzh): Enhance with debug information for out-of-range and more. if (bytes < region_.data() || bytes >= region_.data() + region_.size()) { |