- give PFunction a bit more information:

* explicitly require passing the owning class when creating it.
 * extract self pointer class when adding a variant.
 * put the flags on the single variants, we can not fully rule out that they will be 100% identical, if variants ever get allowed.
This commit is contained in:
Christoph Oelckers 2016-10-15 15:50:45 +02:00
commit db8ab1bc4a
10 changed files with 196 additions and 33 deletions

View file

@ -2119,7 +2119,7 @@ static int PatchCodePtrs (int dummy)
else
{
TArray<DWORD> &args = sym->Variants[0].ArgFlags;
if ((sym->Flags & (VARF_Method | VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > NAP && !(args[NAP] & VARF_Optional)))
if ((sym->Variants[0].Flags & (VARF_Method | VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > NAP && !(args[NAP] & VARF_Optional)))
{
Printf("Frame %d: Incompatible code pointer '%s'\n", frame, Line2);
sym = NULL;
@ -2731,7 +2731,7 @@ static bool LoadDehSupp ()
else
{
TArray<DWORD> &args = sym->Variants[0].ArgFlags;
if ((sym->Flags & (VARF_Method|VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > NAP && !(args[NAP] & VARF_Optional)))
if ((sym->Variants[0].Flags & (VARF_Method|VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > NAP && !(args[NAP] & VARF_Optional)))
{
sc.ScriptMessage("Incompatible code pointer '%s'", sc.String);
}