From 442dd12f8f94f80ee6747d0b66e65128600488b4 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 2 Oct 2019 12:39:32 +1000 Subject: [PATCH] alloc/foreign: dellocate should take a void pointer --- alloc/aligned/foreign.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alloc/aligned/foreign.hpp b/alloc/aligned/foreign.hpp index 898fc8b3..60590503 100644 --- a/alloc/aligned/foreign.hpp +++ b/alloc/aligned/foreign.hpp @@ -76,17 +76,17 @@ namespace cruft::alloc::aligned { decltype(auto) - deallocate (u08 *ptr, std::size_t bytes, std::size_t alignment) + deallocate (void *ptr, std::size_t bytes, std::size_t alignment) { CHECK_MOD (m_alignment, alignment); - return m_successor.deallocate (ptr - m_offset, bytes, alignment); + return m_successor.deallocate (reinterpret_cast (ptr) - m_offset, bytes, alignment); } decltype(auto) - deallocate (u08 *ptr, std::size_t bytes) + deallocate (void *ptr, std::size_t bytes) { - return m_successor.deallocate (ptr - m_offset, bytes, m_alignment); + return m_successor.deallocate (reinterpret_cast (ptr) - m_offset, bytes, m_alignment); }