File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,11 @@ std::vector<T> removeInvalidTurnPaths(std::vector<T> turn_relations,
4242 is_valid_edge (via_node_path.via , via_node_path.to );
4343 };
4444
45- const auto is_valid_way = [is_valid_edge](const auto &via_way_path)
45+ const auto is_valid_way = [is_valid_edge](const ViaWayPath &via_way_path)
4646 {
47+ if (!via_way_path.Valid ())
48+ return false ;
49+
4750 if (!is_valid_edge (via_way_path.from , via_way_path.via .front ()))
4851 return false ;
4952
@@ -59,13 +62,16 @@ std::vector<T> removeInvalidTurnPaths(std::vector<T> turn_relations,
5962
6063 const auto is_invalid = [is_valid_way, is_valid_node](const auto &turn_relation)
6164 {
62- if (turn_relation.turn_path .Type () == TurnPathType::VIA_NODE_TURN_PATH )
65+ switch (turn_relation.turn_path .Type ())
6366 {
67+ case TurnPathType::VIA_NODE_TURN_PATH:
6468 return !is_valid_node (turn_relation.turn_path .AsViaNodePath ());
69+ case TurnPathType::VIA_WAY_TURN_PATH:
70+ return !is_valid_way (turn_relation.turn_path .AsViaWayPath ());
71+ default :
72+ break ;
6573 }
66-
67- BOOST_ASSERT (turn_relation.turn_path .Type () == TurnPathType::VIA_WAY_TURN_PATH);
68- return !is_valid_way (turn_relation.turn_path .AsViaWayPath ());
74+ return true ;
6975 };
7076
7177 const auto end_valid_relations =
You can’t perform that action at this time.
0 commit comments