From 1549e40705477d1aeb5cc783d045a7308a37c6bc Mon Sep 17 00:00:00 2001 From: Nathaniel Filardo Date: Thu, 18 Mar 2021 22:27:25 +0000 Subject: [PATCH] NFC: cdllist: some residual pointer wrapper violence Missed this the last time around --- src/ds/cdllist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } };