Skip to content

Commit

Permalink
Fix costing enum for avoids in loki (#2856)
Browse files Browse the repository at this point in the history
* loki was looking up the wrong costing enum for avoids
  • Loading branch information
nilsnolde committed Feb 10, 2021
1 parent 0dec3f7 commit 54c457a
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 @@ -14,6 +14,7 @@
* FIXED: Fix logic bidirectional astar to avoid double u-turns and extra detours [#2802](https://github.com/valhalla/valhalla/pull/2802)
* FIXED: Re-enable transition cost for motorcycle profile [#2837](https://github.com/valhalla/valhalla/pull/2837)
* FIXED: Increase limits for timedep_* algorithms. Split track_factor into edge factor and transition penalty [#2845](https://github.com/valhalla/valhalla/pull/2845)
* FIXED: Loki was looking up the wrong costing enum for avoids [#2856](https://github.com/valhalla/valhalla/pull/2856)

* **Enhancement**
* CHANGED: Azure uses ninja as generator [#2779](https://github.com/valhalla/valhalla/pull/2779)
Expand Down
2 changes: 1 addition & 1 deletion src/loki/worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void loki_worker_t::parse_costing(Api& api, bool allow_none) {
auto avoid_locations = PathLocation::fromPBF(options.avoid_locations());
auto results = loki::Search(avoid_locations, *reader, costing);
std::unordered_set<uint64_t> avoids;
auto* co = options.mutable_costing_options(static_cast<uint8_t>(costing->travel_mode()));
auto* co = options.mutable_costing_options(options.costing());
for (const auto& result : results) {
for (const auto& edge : result.second.edges) {
auto inserted = avoids.insert(edge.id);
Expand Down

0 comments on commit 54c457a

Please sign in to comment.