alloc/allocator: take type into account for sizes and ptrs
This commit is contained in:
parent
87fc5df03d
commit
d00d724296
@ -35,16 +35,19 @@ namespace util::alloc {
|
|||||||
{ ; }
|
{ ; }
|
||||||
|
|
||||||
|
|
||||||
ValueT* allocate (size_t count)
|
ValueT*
|
||||||
|
allocate (size_t count)
|
||||||
{
|
{
|
||||||
return m_backing.template allocate<ValueT> (count);
|
return reinterpret_cast<ValueT*> (
|
||||||
|
m_backing.template allocate (sizeof (ValueT) * count)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
deallocate (ValueT *t, size_t count)
|
deallocate (ValueT *t, size_t count)
|
||||||
{
|
{
|
||||||
return m_backing.template deallocate (t, count);
|
return m_backing.template deallocate (t, sizeof (ValueT) * count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user