ds/address::is_aligned_block: don't cast to size_t
Now that address_t is always a scalar, there's no reason to cast to size_t.
This commit is contained in:
@@ -51,8 +51,7 @@ namespace snmalloc
|
|||||||
{
|
{
|
||||||
static_assert(bits::next_pow2_const(alignment) == alignment);
|
static_assert(bits::next_pow2_const(alignment) == alignment);
|
||||||
|
|
||||||
return ((static_cast<size_t>(address_cast(p)) | size) & (alignment - 1)) ==
|
return ((address_cast(p) | size) & (alignment - 1)) == 0;
|
||||||
0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user