Fall back to generic match finding if not a reverse-lane

This commit is contained in:
Daniel J. Hofmann 2016-08-03 10:43:54 +02:00
parent 3c0b52c637
commit 5f339f4ed6

View File

@ -351,8 +351,10 @@ bool TurnLaneHandler::isSimpleIntersection(const LaneDataVector &lane_data,
if (lane_data.back().tag == TurnLaneType::uturn)
return findBestMatchForReverse(lane_data[lane_data.size() - 2].tag, intersection);
BOOST_ASSERT(lane_data.front().tag == TurnLaneType::uturn);
return findBestMatchForReverse(lane_data[1].tag, intersection);
if (lane_data.front().tag == TurnLaneType::uturn)
return findBestMatchForReverse(lane_data[1].tag, intersection);
return findBestMatch(data.tag, intersection);
}();
std::size_t match_index = std::distance(intersection.begin(), best_match);
all_simple &= (matched_indices.count(match_index) == 0);