mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-18 01:42:01 +00:00
- undid bad code from a broken GZDoom PR.
This commit is contained in:
parent
09c8430e4e
commit
6729c342af
1 changed files with 0 additions and 8 deletions
|
@ -274,14 +274,6 @@ bool AreCompatiblePointerTypes(PType *dest, PType *source, bool forcompare)
|
||||||
{
|
{
|
||||||
auto fromtype = source->toPointer();
|
auto fromtype = source->toPointer();
|
||||||
auto totype = dest->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.
|
// null pointers can be assigned to everything, everything can be assigned to void pointers.
|
||||||
if (fromtype == nullptr || totype == TypeVoidPtr) return true;
|
if (fromtype == nullptr || totype == TypeVoidPtr) return true;
|
||||||
// when comparing const-ness does not matter.
|
// when comparing const-ness does not matter.
|
||||||
|
|
Loading…
Reference in a new issue