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

Roundabouts into ferries #3766

Merged
merged 2 commits into from
Apr 7, 2017
Merged

Roundabouts into ferries #3766

merged 2 commits into from
Apr 7, 2017

Conversation

MoKob
Copy link

@MoKob MoKob commented Mar 2, 2017

Issue

Resolves #3762

Tasklist

  • Fix Roundabout into ferry handling
    - see discussion over at ticket
  • update relevant Wiki pages
  • add regression / cucumber cases (see docs/testing.md)
  • review
  • adjust for comments

Copy link
Member

@daniel-j-h daniel-j-h left a 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;
}
Copy link
Member

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.

Copy link
Member

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.

Copy link
Author

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.
Copy link
Member

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.

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

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

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

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?

Copy link
Author

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.

@TheMarex TheMarex force-pushed the roundabout_into_ferry branch from d6d762e to 976f874 Compare April 7, 2017 10:48
@TheMarex TheMarex merged commit 4e9e2ed into master Apr 7, 2017
@TheMarex TheMarex deleted the roundabout_into_ferry branch April 7, 2017 15:29
@oxidase oxidase mentioned this pull request Jun 7, 2017
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants