Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't flush the tree when evaluating the *-argument conditionals #2947

Merged
merged 1 commit into from Dec 2, 2020

Conversation

Goober5000
Copy link
Contributor

This is a follow-up to PR #2942. Given that the short-circuiting is now explicitly skipped for node trees containing the special argument, it should no longer be necessary to flush the conditional branch of the sexp tree. (The .cache field is already skipped for special-arg nodes.)

The sexp tree is still explicitly flushed for every-time and every-time-argument.

This is a follow-up to PR scp-fs2open#2942.  Given that the short-circuiting is now explicitly skipped for node trees containing the special argument, it should no longer be necessary to flush the conditional branch of the sexp tree.  (The .cache field is already skipped for special-arg nodes.)

The sexp tree is still explicitly flushed for `every-time` and `every-time-argument`.
@Goober5000 Goober5000 added the cleanup A modification or rewrite of code to make it more understandable or easier to maintain. label Dec 1, 2020
Copy link
Member

@MageKing17 MageKing17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a bonus, the conditional node should now short-circuit properly if it doesn't rely on "<argument>".

@Goober5000 Goober5000 merged commit 8252d39 into scp-fs2open:master Dec 2, 2020
@Goober5000 Goober5000 deleted the short_circuiting_update branch December 2, 2020 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup A modification or rewrite of code to make it more understandable or easier to maintain.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants