- deprecated the global 'level' variable.
This will currently output 9 warnings for the UDMF property getters. To silence these a bit more work is needed.
This commit is contained in:
parent
e9954ee018
commit
84baa5bb4d
3 changed files with 17 additions and 2 deletions
|
|
@ -6132,9 +6132,21 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
|
|||
{
|
||||
if (sym->mVersion <= ctx.Version)
|
||||
{
|
||||
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
|
||||
if (!(ctx.Function->Variants[0].Flags & VARF_Deprecated) && Wads.GetLumpFile(ctx.Lump) == 0)
|
||||
{
|
||||
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allow use of deprecated symbols in deprecated functions of the internal code. This is meant to allow deprecated code to remain as it was,
|
||||
// even if it depends on some deprecated symbol.
|
||||
// The main motivation here is to keep the deprecated static functions accessing the global level variable as they were.
|
||||
// Print these only if debug output is active and at the highest verbosity level.
|
||||
ScriptPosition.Message(MSG_DEBUGMSG, TEXTCOLOR_BLUE "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
newex = new FxGlobalVariable(static_cast<PField *>(sym), ScriptPosition);
|
||||
goto foundit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue