From e000c7d81813e3c8400564b1ceb6b57aeddc4056 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 14 Aug 2024 13:20:40 +0300 Subject: [PATCH] BAN: Use static_cast instead of C-style cast in RefPtr deletion --- BAN/include/BAN/RefPtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BAN/include/BAN/RefPtr.h b/BAN/include/BAN/RefPtr.h index 6f0e5108..155de4e3 100644 --- a/BAN/include/BAN/RefPtr.h +++ b/BAN/include/BAN/RefPtr.h @@ -44,7 +44,7 @@ namespace BAN uint32_t old = m_ref_count.fetch_sub(1); ASSERT(old > 0); if (old == 1) - delete (const T*)this; + delete static_cast(this); } protected: