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

Fix refactor bug #2064

Merged
merged 2 commits into from
Nov 21, 2019
Merged

Fix refactor bug #2064

merged 2 commits into from
Nov 21, 2019

Conversation

purew
Copy link
Contributor

@purew purew commented Nov 20, 2019

Issue

What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.

Tasklist

  • Add tests
  • Review - you must request approval to merge any PR to master
  • Add #fixes with the issue number that this PR addresses
  • Generally use squash merge to rebase and clean comments before merging
  • Update the changelog
  • Update relevant documentation

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

The StopExpansion distance argument was removed during the
refactor in 6492d3d. This restores the correct behaviour
@@ -97,11 +97,11 @@ bool TimeDepForward::ExpandForward(GraphReader& graphreader,
if (trans->up()) {
hierarchy_limits_[node.level()].up_transition_count++;
found_valid_edge = ExpandForward(graphreader, trans->endnode(), pred, pred_idx, true,
seconds_of_week, localtime, destination, best_path) ||
localtime, seconds_of_week, destination, best_path) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This mixup of the order of localtime and seconds_of_week seems to have been in the code for over a year?

Copy link
Member

Choose a reason for hiding this comment

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

oops! Good catch. This code was never well tested (my only defense/excuse).

Copy link
Member

Choose a reason for hiding this comment

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

i swear i fixed this myself a cuople months ago...

found_valid_edge;
} else if (!hierarchy_limits_[trans->endnode().level()].StopExpanding()) {
} else if (!hierarchy_limits_[trans->endnode().level()].StopExpanding(pred.distance())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I introducted this bug during the refactor in 6492d3d

@kevinkreiser kevinkreiser merged commit 99b7e2a into master Nov 21, 2019
@purew purew deleted the fix-refactor-bug branch November 21, 2019 16:50
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

3 participants