From 6729c342af35482306a67a135e72fd8b0024af6e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 11 Feb 2023 19:49:49 +0100 Subject: [PATCH] - undid bad code from a broken GZDoom PR. --- source/common/scripting/backend/codegen.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/common/scripting/backend/codegen.cpp b/source/common/scripting/backend/codegen.cpp index 02f03d691..09abbe604 100644 --- a/source/common/scripting/backend/codegen.cpp +++ b/source/common/scripting/backend/codegen.cpp @@ -274,14 +274,6 @@ bool AreCompatiblePointerTypes(PType *dest, PType *source, bool forcompare) { auto fromtype = source->toPointer(); auto totype = dest->toPointer(); - // implicit pointer casts - if( fromtype->isClassPointer() && !totype->isClassPointer() ) totype->toClassPointer(fromtype); // just to make sure they're compatible pointer types - else if( !fromtype->isClassPointer() && totype->isClassPointer() ) fromtype->toClassPointer(totype); // just to make sure they're compatible pointer types - else if( fromtype->PointedType != totype->PointedType ) - { - auto res = fromtype->PointedType->toClass(totype->PointedType); - if(!res || res != totype->PointedType) return false; - } // null pointers can be assigned to everything, everything can be assigned to void pointers. if (fromtype == nullptr || totype == TypeVoidPtr) return true; // when comparing const-ness does not matter.