NFC: cdllist: some residual pointer wrapper violence

Missed this the last time around
This commit is contained in:
Nathaniel Filardo
2021-03-18 22:27:25 +00:00
committed by Matthew Parkinson
parent c5e08573bf
commit 1549e40705

View File

@@ -51,7 +51,7 @@ namespace snmalloc
protected:
void set_next(Ptr<T> c)
{
next = (c == static_cast<Ptr<T>>(this)) ? nullptr : c;
next = address_cast(c) == address_cast(this) ? nullptr : c;
}
public:
@@ -62,7 +62,7 @@ namespace snmalloc
SNMALLOC_FAST_PATH Ptr<T> get_next()
{
return next == nullptr ? static_cast<Ptr<T>>(this) : next;
return next == nullptr ? Ptr<T>(static_cast<T*>(this)) : next;
}
};