| 298 | |
| 299 | template <class TIter> |
| 300 | void SetGeometry(TIter beg, TIter end) |
| 301 | { |
| 302 | if (beg == end) |
| 303 | { |
| 304 | FollowedPolyline().Swap(m_poly); |
| 305 | } |
| 306 | else |
| 307 | { |
| 308 | FollowedPolyline(beg, end).Swap(m_poly); |
| 309 | // If there are no intermediate points it's acceptable to have an empty m_subrouteAttrs. |
| 310 | // Constructed m_poly will have the last point index as next checkpoint index, it's right. |
| 311 | if (!m_subrouteAttrs.empty()) |
| 312 | { |
| 313 | ASSERT_GREATER(m_subrouteAttrs.size(), m_currentSubrouteIdx, ()); |
| 314 | m_poly.SetNextCheckpointIndex(m_subrouteAttrs[m_currentSubrouteIdx].GetEndSegmentIdx()); |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | void SetRouteSegments(std::vector<RouteSegment> && routeSegments); |
| 320 | |