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

topological_sorting: replace ineffective continue with break #229

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

conpierce8
Copy link
Contributor

@conpierce8 conpierce8 commented Oct 26, 2023

Description of issue

The continue statement in ufl.utils.sorting.topological_sorting (https://github.com/FEniCS/ufl/blob/main/ufl/utils/sorting.py#L25) has no effect: it causes execution to jump to the beginning of the inner for loop, which would happen anyway since there is no code following the continue inside the loop. It should be a break statement, since there is no need to continue searching the edges once node has been removed from S.

Description of changes

This pull request replaces the offending continue with a break.

@mscroggs mscroggs merged commit 1bb1622 into FEniCS:main Oct 26, 2023
11 checks passed
@conpierce8 conpierce8 deleted the topo-sort branch November 1, 2023 15:33
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.

None yet

2 participants