backend/largebuddyrange: remove unnecessary casts

Since Holder is just an alias for uintptr_t and the fields in the MetaEntry are
uintptr_t-s, just return the lvalue-s directly rather than jumping through
*reinterpret_cast<T*>(& ...).
This commit is contained in:
Nathaniel Wesley Filardo
2022-03-17 17:53:15 +00:00
committed by Nathaniel Wesley Filardo
parent 5287000453
commit 62cce1a20e

View File

@@ -43,9 +43,9 @@ namespace snmalloc
MetaEntry& entry =
Pagemap::template get_metaentry_mut<false>(address_cast(k));
if (direction)
return *reinterpret_cast<Holder*>(&entry.meta);
return entry.meta;
return *reinterpret_cast<Holder*>(&entry.remote_and_sizeclass);
return entry.remote_and_sizeclass;
}
static bool is_red(Contents k)