diff --git a/src/ds/cdllist.h b/src/ds/cdllist.h index db52efc..f32f661 100644 --- a/src/ds/cdllist.h +++ b/src/ds/cdllist.h @@ -51,7 +51,7 @@ namespace snmalloc protected: void set_next(Ptr c) { - next = (c == static_cast>(this)) ? nullptr : c; + next = address_cast(c) == address_cast(this) ? nullptr : c; } public: @@ -62,7 +62,7 @@ namespace snmalloc SNMALLOC_FAST_PATH Ptr get_next() { - return next == nullptr ? static_cast>(this) : next; + return next == nullptr ? Ptr(static_cast(this)) : next; } };