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 costing enum for avoids in loki #2856

Merged
merged 3 commits into from
Feb 10, 2021
Merged

Fix costing enum for avoids in loki #2856

merged 3 commits into from
Feb 10, 2021

Conversation

nilsnolde
Copy link
Member

fixes #2853

"by accident" car and bike worked out, all the other profiles not so much..

@danpat danpat merged commit 54c457a into master Feb 10, 2021
@danpat
Copy link
Member

danpat commented Feb 10, 2021

🤦

@@ -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()));
Copy link
Member

Choose a reason for hiding this comment

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

yeah this is easy to confuse with mode costing which has a costing object per mode of travel (for multimodal). tbh i started working on a refactor of all of this stuff to make it less confusing but i never got it finished. we kind of made a mistake in the original api design that forced us into multimodal making everything miserable for us

@nilsnolde nilsnolde deleted the nn_fix_avoids branch February 24, 2024 14:55
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.

Avoid locations and truck profile
3 participants