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 acc6da86de
commit 46a4c27582

View File

@ -352,8 +352,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);