From df6adcc5e9f7aa47947219f556c981b8bb191d6e Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Thu, 5 Sep 2024 23:42:16 +0200 Subject: [PATCH] Fix -Wdelete-incomplete in CDefaultCustomWeaponEntityFactory::ReleaseData() GCC warns about attempting to delete a void-pointer, since it will not be able to invoke its destructor. Fix by casing it to the expected type. --- sp/src/game/server/mapbase/custom_weapon_factory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/server/mapbase/custom_weapon_factory.h b/sp/src/game/server/mapbase/custom_weapon_factory.h index 3abb17ed..bf46880b 100644 --- a/sp/src/game/server/mapbase/custom_weapon_factory.h +++ b/sp/src/game/server/mapbase/custom_weapon_factory.h @@ -107,7 +107,7 @@ public: virtual void ReleaseData(const void* pData) const { - delete pData; + delete (Data*)pData; } };