Skip to content

Commit

Permalink
Fix expansion callback (valhalla#4821)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstnbwnkl authored Jul 30, 2024
1 parent 270163c commit 5c1eb84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* FIXED: `top_speed` range not fully allowed for trucks [#4793](https://github.com/valhalla/valhalla/pull/4793)
* FIXED: Trivial routes for CostMatrix [#4634](https://github.com/valhalla/valhalla/pull/4634)
* FIXED: Reset `not_thru_pruning` in CostMatrix after second pass was used [#4817](https://github.com/valhalla/valhalla/pull/4817)
* FIXED: wrong index used in CostMatrix expansion callback inside reverse connection check [#4821](https://github.com/valhalla/valhalla/pull/4821)

* **Enhancement**
* UPDATED: French translations, thanks to @xlqian [#4159](https://github.com/valhalla/valhalla/pull/4159)
Expand Down
2 changes: 1 addition & 1 deletion src/thor/costmatrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ void CostMatrix::CheckReverseConnections(const uint32_t target,
if (expansion_callback_) {
auto prev_pred = rev_pred.predecessor() == kInvalidLabel
? GraphId{}
: edgelabel_[MATRIX_REV][source][rev_pred.predecessor()].edgeid();
: edgelabel_[MATRIX_REV][target][rev_pred.predecessor()].edgeid();
expansion_callback_(graphreader, rev_pred.edgeid(), prev_pred, "costmatrix",
Expansion_EdgeStatus_connected, rev_pred.cost().secs,
rev_pred.path_distance(), rev_pred.cost().cost,
Expand Down

0 comments on commit 5c1eb84

Please sign in to comment.