NFC: pointer_offset* functions always return void*
This requires that the caller perform the cast on the output rather than the input, which is a little closer to the truth. Shuffle some casts into the right position.
This commit is contained in:
committed by
Matthew Parkinson
parent
f295a3f191
commit
cbab7a3455
@@ -183,8 +183,8 @@ namespace snmalloc
|
||||
Slab* alloc_slab(sizeclass_t sizeclass)
|
||||
{
|
||||
uint8_t h = head;
|
||||
Slab* slab = pointer_offset(
|
||||
reinterpret_cast<Slab*>(this), (static_cast<size_t>(h) << SLAB_BITS));
|
||||
Slab* slab = reinterpret_cast<Slab*>(
|
||||
pointer_offset(this, (static_cast<size_t>(h) << SLAB_BITS)));
|
||||
|
||||
uint8_t n = meta[h].next;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user