MCPcopy Create free account
hub / github.com/ZDoom/Raze / AreCompatibleFnPtrs

Function AreCompatibleFnPtrs

source/common/scripting/backend/codegen.cpp:12598–12614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12596}
12597
12598static bool AreCompatibleFnPtrs(PFunctionPointer * to, PFunctionPointer * from)
12599{
12600 if(to->PointedType == TypeVoid) return true;
12601 else if(from->PointedType == TypeVoid) return false;
12602
12603 PPrototype * toProto = (PPrototype *)to->PointedType;
12604 PPrototype * fromProto = (PPrototype *)from->PointedType;
12605 return
12606 ( FScopeBarrier::CheckSidesForFunctionPointer(from->Scope, to->Scope)
12607 /*
12608 && toProto->ArgumentTypes == fromProto->ArgumentTypes
12609 && toProto->ReturnTypes == fromProto->ReturnTypes
12610 */
12611 && AreCompatibleFnPtrTypes(toProto, fromProto)
12612 && to->ArgFlags == from->ArgFlags
12613 );
12614}
12615
12616FxExpression *FxFunctionPtrCast::Resolve(FCompileContext &ctx)
12617{

Callers 2

AreCompatibleFnPtrTypesFunction · 0.85
ResolveMethod · 0.85

Calls 1

AreCompatibleFnPtrTypesFunction · 0.85

Tested by

no test coverage detected