-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Roundabouts into ferries #3766
Roundabouts into ferries #3766
Conversation
f954d46
to
705986f
Compare
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.
Looks good from what I can tell and reading the description in the issue ticket.
inline bool RouteStep::IsCompatible(const RouteStep &other) const | ||
{ | ||
return mode == other.mode; | ||
} |
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.
Hm I'm a bit out of the loop here but I thought we had this exact function already.
Can't see it on the route step, so this should be fine for sure.
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 have a similar concept for graph compression, I didn't find anything explicit for guidance.
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.
inline bool haveSameMode(const RouteStep &lhs, const RouteStep &rhs) |
@@ -144,6 +146,14 @@ inline RouteStep &RouteStep::AddInFront(const RouteStep &preceeding_step) | |||
return *this; | |||
} | |||
|
|||
// checks whether we can actually merge two route steps: | |||
// They neeed to have the same mode, because a route step | |||
// can only have one mode. |
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.
Maybe add the comments to the decl. and not the impl.
include/storage/shared_monitor.hpp
Outdated
@@ -12,7 +12,7 @@ | |||
#include <boost/interprocess/sync/scoped_lock.hpp> | |||
|
|||
#if defined(__linux__) | |||
#define USE_BOOST_INTERPROCESS_CONDITION 1 | |||
//#define USE_BOOST_INTERPROCESS_CONDITION 1 |
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.
Do you want to revert this before merging?
BOOST_ASSERT(leavesRoundabout(steps[step_index].maneuver.instruction)); | ||
steps[step_index-1].maneuver.instruction = steps[step_index].maneuver.instruction; | ||
if (!entersRoundabout(steps[step_index-1].maneuver.instruction)) | ||
steps[step_index-1].maneuver.exit = steps[step_index].maneuver.exit; |
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.
can you alias steps[step_index - 1] for readability
steps[step_index-1].maneuver.instruction = steps[step_index].maneuver.instruction; | ||
if (!entersRoundabout(steps[step_index-1].maneuver.instruction)) | ||
steps[step_index-1].maneuver.exit = steps[step_index].maneuver.exit; | ||
steps[step_index].maneuver.instruction.type = TurnType::Notification; |
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.
Notification to signal a change in travel mode?
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.
That is our designed behaviour.
d6d762e
to
976f874
Compare
Issue
Resolves #3762
Tasklist
- see discussion over at ticket