From 3d31f117e09a0f286ef875596f6046e78698286d Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 9 Mar 2022 16:22:58 +0100 Subject: [PATCH] express: Fix compilation error with GCC --- panda/src/express/weakPointerToBase.I | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/panda/src/express/weakPointerToBase.I b/panda/src/express/weakPointerToBase.I index 11b04dabfe..41206e0994 100644 --- a/panda/src/express/weakPointerToBase.I +++ b/panda/src/express/weakPointerToBase.I @@ -33,9 +33,7 @@ WeakPointerToBase(To *ptr) { template INLINE WeakPointerToBase:: WeakPointerToBase(const PointerToBase ©) { - // This double-casting is a bit of a cheat to get around the inheritance - // issue--it's difficult to declare a template class to be a friend. - To *ptr = (To *)((const WeakPointerToBase *)©)->_void_ptr; + To *ptr = (To *)copy._void_ptr; _void_ptr = ptr; if (ptr != nullptr) { _weak_ref = ptr->weak_ref();