Make writing patches not affect the expression

This also removes one int member from the struct that shouldn't be there
This commit is contained in:
ISSOtm
2020-02-23 22:27:33 +01:00
parent ef2bfe4ea0
commit cfe21876e5
4 changed files with 14 additions and 26 deletions

View File

@@ -81,7 +81,6 @@ void rpn_Init(struct Expression *expr)
expr->nRPNCapacity = 0;
expr->nRPNLength = 0;
expr->nRPNPatchSize = 0;
expr->nRPNOut = 0;
}
/*
@@ -94,17 +93,6 @@ void rpn_Free(struct Expression *expr)
rpn_Init(expr);
}
/*
* Returns the next rpn byte in expression
*/
uint16_t rpn_PopByte(struct Expression *expr)
{
if (expr->nRPNOut == expr->nRPNLength)
return 0xDEAD;
return expr->tRPN[expr->nRPNOut++];
}
/*
* Determine if the current expression is known at assembly time
*/