diff --git a/features/testbot/matching.feature b/features/testbot/matching.feature index bee3d9cba..71ac0776c 100644 --- a/features/testbot/matching.feature +++ b/features/testbot/matching.feature @@ -85,3 +85,22 @@ Feature: Basic Map Matching | trace | matchings | | dcba | hgfe | + Scenario: Testbot - Matching with oneway streets + Given a grid size of 10 meters + Given the node map + | a | b | c | d | + | e | f | g | h | + + And the ways + | nodes | oneway | + | ab | yes | + | bc | yes | + | cd | yes | + | hg | yes | + | gf | yes | + | fe | yes | + + When I match I should get + | trace | matchings | + | dcba | hg,gf,fe | + | efgh | ab,bc,cd | diff --git a/include/engine/routing_algorithms/shortest_path.hpp b/include/engine/routing_algorithms/shortest_path.hpp index 972093174..c4181a6d1 100644 --- a/include/engine/routing_algorithms/shortest_path.hpp +++ b/include/engine/routing_algorithms/shortest_path.hpp @@ -309,7 +309,7 @@ class ShortestPathRouting final new_total_distance_to_forward, packed_leg_to_forward); // if only the reverse node is valid (e.g. when using the match plugin) we // actually need to move - if (target_phantom.forward_segment_id.enabled) + if (!target_phantom.forward_segment_id.enabled) { BOOST_ASSERT(target_phantom.reverse_segment_id.enabled); new_total_distance_to_reverse = new_total_distance_to_forward; diff --git a/include/extractor/restriction_parser.hpp b/include/extractor/restriction_parser.hpp index d2be8c1f9..8722bf12b 100644 --- a/include/extractor/restriction_parser.hpp +++ b/include/extractor/restriction_parser.hpp @@ -19,7 +19,7 @@ namespace osrm namespace extractor { -class ProfileProperties; +struct ProfileProperties; /** * Parses the relations that represents turn restrictions.