mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
Remove redundant Resolves
- ParseExpression() calls Resolve() on the FxExpression before returing it, so there's no need to immediately Resolve() what it returns.
This commit is contained in:
parent
4f528e3832
commit
5cc8a9c2a7
1 changed files with 0 additions and 8 deletions
|
@ -208,8 +208,6 @@ static void ParseConstant (FScanner &sc, PSymbolTable *symt, PClassActor *cls)
|
|||
FxExpression *expr = ParseExpression (sc, cls);
|
||||
sc.MustGetToken(';');
|
||||
|
||||
FCompileContext ctx(cls);
|
||||
expr = expr->Resolve(ctx);
|
||||
if (!expr->isConstant())
|
||||
{
|
||||
sc.ScriptMessage("Constant definition is not a constant");
|
||||
|
@ -266,8 +264,6 @@ static void ParseEnum (FScanner &sc, PSymbolTable *symt, PClassActor *cls)
|
|||
if (sc.CheckToken('='))
|
||||
{
|
||||
FxExpression *expr = ParseExpression (sc, cls);
|
||||
FCompileContext ctx(cls);
|
||||
expr = expr->Resolve(ctx);
|
||||
if (!expr->isConstant())
|
||||
{
|
||||
sc.ScriptMessage("'%s' must be constant", symname.GetChars());
|
||||
|
@ -355,8 +351,6 @@ static void ParseNativeVariable (FScanner &sc, PSymbolTable *symt, PClassActor *
|
|||
if (sc.CheckToken('['))
|
||||
{
|
||||
FxExpression *expr = ParseExpression (sc, cls);
|
||||
FCompileContext ctx(cls);
|
||||
expr = expr->Resolve(ctx);
|
||||
if (!expr->isConstant())
|
||||
{
|
||||
sc.ScriptError("Array size must be constant");
|
||||
|
@ -428,9 +422,7 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl
|
|||
if (sc.CheckToken('['))
|
||||
{
|
||||
FxExpression *expr = ParseExpression(sc, cls);
|
||||
FCompileContext ctx(cls);
|
||||
int maxelems;
|
||||
expr = expr->Resolve(ctx);
|
||||
if (!expr->isConstant())
|
||||
{
|
||||
sc.ScriptMessage("Array size must be a constant");
|
||||
|
|
Loading…
Reference in a new issue