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

front: use matchPathStepAndOp() in TimesStopsInput's clearPathStep() #9756

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

emersion
Copy link
Member

@emersion emersion commented Nov 18, 2024

We already have a function which matches an OP and a path step.
Re-use it instead of hand-rolling our own logic.

In the UIC case, match by positionOnPath instead of name: this
should be more robust. In the track offset case, drop the opId
check because track offsets never have an OP ID.

@emersion emersion requested a review from a team as a code owner November 18, 2024 10:08
@emersion emersion self-assigned this Nov 18, 2024
@Synar
Copy link
Contributor

Synar commented Nov 18, 2024

Very nice! I haven't had the chance to test it yet, but the old way was indeed quite complex and flaky.

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Tested and it seems we can't remove any step now, see comment

We already have a function which matches an OP and a path step.
Re-use it instead of hand-rolling our own logic.

In the UIC case, match by positionOnPath instead of name: this
should be more robust. In the track offset case, drop the opId
check because track offsets never have an OP ID.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/simplify-rm-via branch from e98e6ee to f0ea907 Compare November 21, 2024 15:12
@emersion emersion changed the title front: simplify clearPathStep() in TimesStopsInput front: use matchPathStepAndOp() in TimesStopsInput's clearPathStep() Nov 21, 2024
@emersion emersion requested a review from SharglutDev November 21, 2024 15:12
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Lgtm and tested !

@emersion emersion added this pull request to the merge queue Nov 26, 2024
Merged via the queue into dev with commit 5c08eae Nov 26, 2024
27 checks passed
@emersion emersion deleted the emr/simplify-rm-via branch November 26, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants