| 1596 | } |
| 1597 | |
| 1598 | vector<RouteMarkData> RoutingManager::GetRoutePointsToSave() const |
| 1599 | { |
| 1600 | auto points = GetRoutePoints(); |
| 1601 | if (points.size() < 2 || points.back().m_isPassed) |
| 1602 | return {}; |
| 1603 | |
| 1604 | vector<RouteMarkData> result; |
| 1605 | result.reserve(points.size()); |
| 1606 | |
| 1607 | // Save last passed point. It will be used on points loading if my position |
| 1608 | // isn't determined. |
| 1609 | result.emplace_back(GetLastPassedPoint(m_bmManager, points)); |
| 1610 | |
| 1611 | for (auto & p : points) |
| 1612 | { |
| 1613 | // Here we skip passed points and the start point. |
| 1614 | if (p.m_isPassed || p.m_pointType == RouteMarkType::Start) |
| 1615 | continue; |
| 1616 | |
| 1617 | result.push_back(std::move(p)); |
| 1618 | } |
| 1619 | |
| 1620 | if (result.size() < 2) |
| 1621 | return {}; |
| 1622 | |
| 1623 | return result; |
| 1624 | } |
| 1625 | |
| 1626 | void RoutingManager::OnExtrapolatedLocationUpdate(location::GpsInfo const & info) |
| 1627 | { |
nothing calls this directly
no test coverage detected