-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added trip service #20
base: master
Are you sure you want to change the base?
Conversation
Hey thanks for this 🥳 I'll come back to you on Monday with a review 🤗
…On May 1, 2020 1:43:01 PM UTC, "H.M.S.Nishantha" ***@***.***> wrote:
You can view, comment on, or merge this pull request online at:
#20
-- Commit Summary --
* Added trip service
-- File Changes --
M libosrmc/osrmc.cc (130)
M libosrmc/osrmc.h (21)
-- Patch Links --
https://github.com/daniel-j-h/libosrmc/pull/20.patch
https://github.com/daniel-j-h/libosrmc/pull/20.diff
|
} | ||
} catch (const std::exception& e) { | ||
osrmc_error_from_exception(e, error); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these annotation features needed for the trip service?
If you want them in, can you split it at least into two commits please.
auto* params_typed = reinterpret_cast<osrm::TripParameters*>(params); | ||
|
||
if (first) | ||
params_typed->source = osrm::TripParameters::SourceType::First; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should support all enum values here; not sure a bool first
is enough here.
void osrmc_trip_params_add_destination(osrmc_trip_params_t params, bool last, osrmc_error_t* error) try { | ||
auto* params_typed = reinterpret_cast<osrm::TripParameters*>(params); | ||
if (last) | ||
params_typed->destination = osrm::TripParameters::DestinationType::Last; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
Looks good overall; I left some smaller comments inline. General note: the trip service in osrm is pretty basic. We should probably add a note to the readme pointing the user e.g. to https://github.com/mapbox/node-or-tools which works on top of the distance table. |
@srimaln91 do you still want to run out the suggested changes and then bring it in? |
No description provided.