Skip to content

Conversation

@danieldresser-ie
Copy link
Contributor

When initially working on #5984, I had hoped that it could operate similarly to BranchCreator ( which turned out not to be true ).

While looking through the code in detail, these two changes felt clearer to me:

  • closestExistingPath returned a path, but the strings in that path were never used. existingPathLength just returns the length, which is the only thing we used.
  • We stored depth in the tree of Locations in BranchesData, but this depth is just the number of nodes we visit during a traversal - there's no need to store an extra value.

This only returns the length of the path, which the only part of the return value from this function that was ever used.
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.

1 participant