mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-12 13:12:14 +00:00
Delete default expressions for action definitions
- After StateParams was removed in commit 4a1fbdb
, the expressions for
default paramaters that ParseActionDef() created went nowhere and were
lost. Properly throw them away by deleting them as soon as they've been
parsed.
This commit is contained in:
parent
241622300e
commit
0468b1f9ce
1 changed files with 2 additions and 10 deletions
|
@ -897,8 +897,6 @@ static void ParseActionDef (FScanner &sc, PClassActor *cls)
|
|||
const AFuncDesc *afd;
|
||||
FName funcname;
|
||||
FString args;
|
||||
TArray<FxExpression *> DefaultParams;
|
||||
bool hasdefaults = false;
|
||||
|
||||
if (sc.LumpNum == -1 || Wads.GetLumpFile(sc.LumpNum) > 0)
|
||||
{
|
||||
|
@ -979,18 +977,12 @@ static void ParseActionDef (FScanner &sc, PClassActor *cls)
|
|||
sc.UnGet();
|
||||
}
|
||||
|
||||
FxExpression *def;
|
||||
if (sc.CheckToken('='))
|
||||
{
|
||||
hasdefaults = true;
|
||||
flags |= OPTIONAL;
|
||||
def = ParseParameter(sc, cls, type, true);
|
||||
FxExpression *def = ParseParameter(sc, cls, type, true);
|
||||
delete def;
|
||||
}
|
||||
else
|
||||
{
|
||||
def = NULL;
|
||||
}
|
||||
DefaultParams.Push(def);
|
||||
|
||||
if (!(flags & OPTIONAL) && type != '+')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue