| 121 | } |
| 122 | |
| 123 | Joint::Id RestrictionCollector::GetFirstCommonJoint(uint32_t firstFeatureId, uint32_t secondFeatureId) const |
| 124 | { |
| 125 | uint32_t const firstLen = m_indexGraph.GetRoadGeometry(firstFeatureId).GetPointsCount(); |
| 126 | uint32_t const secondLen = m_indexGraph.GetRoadGeometry(secondFeatureId).GetPointsCount(); |
| 127 | |
| 128 | auto const firstRoad = m_indexGraph.GetRoad(firstFeatureId); |
| 129 | auto const secondRoad = m_indexGraph.GetRoad(secondFeatureId); |
| 130 | |
| 131 | ankerl::unordered_dense::set<Joint::Id> used; |
| 132 | for (uint32_t i = 0; i < firstLen; ++i) |
| 133 | if (firstRoad.GetJointId(i) != Joint::kInvalidId) |
| 134 | used.emplace(firstRoad.GetJointId(i)); |
| 135 | |
| 136 | for (uint32_t i = 0; i < secondLen; ++i) |
| 137 | if (used.count(secondRoad.GetJointId(i)) != 0) |
| 138 | return secondRoad.GetJointId(i); |
| 139 | |
| 140 | return Joint::kInvalidId; |
| 141 | } |
| 142 | |
| 143 | bool RestrictionCollector::FeatureHasPointWithCoords(uint32_t featureId, m2::PointD const & coords) const |
| 144 | { |
nothing calls this directly
no test coverage detected