mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-05 01:11:25 +00:00
Fix deprecation version checks on class fields/pointers
This commit is contained in:
parent
ecdfe39ddf
commit
b0889b9814
2 changed files with 7 additions and 2 deletions
|
@ -170,7 +170,7 @@ VersionInfo PField::GetVersion()
|
|||
{
|
||||
VersionInfo Highest = { 0,0,0 };
|
||||
if (!(Flags & VARF_Deprecated)) Highest = mVersion;
|
||||
if (Type->mVersion > Highest) Highest = Type->mVersion;
|
||||
if (Type->mVersion > Highest && !Type->TypeDeprecated) Highest = Type->mVersion;
|
||||
return Highest;
|
||||
}
|
||||
|
||||
|
|
|
@ -1493,6 +1493,7 @@ PPointer::PPointer(PType *pointsat, bool isconst)
|
|||
{
|
||||
mDescriptiveName.Format("Pointer<%s%s>", pointsat->DescriptiveName(), isconst ? "readonly " : "");
|
||||
mVersion = pointsat->mVersion;
|
||||
TypeDeprecated = pointsat->TypeDeprecated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1674,7 +1675,11 @@ PClassPointer::PClassPointer(PClass *restrict)
|
|||
loadOp = OP_LP;
|
||||
storeOp = OP_SP;
|
||||
Flags |= TYPE_ClassPointer;
|
||||
if (restrict) mVersion = restrict->VMType->mVersion;
|
||||
if (restrict)
|
||||
{
|
||||
mVersion = restrict->VMType->mVersion;
|
||||
TypeDeprecated = restrict->VMType->TypeDeprecated;
|
||||
}
|
||||
else mVersion = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue