mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[routing] SaveRoute minor fixes and CHECK.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
c4599f4889
commit
b107638b8b
@@ -1084,16 +1084,14 @@ kml::TrackId RoutingManager::SaveRoute()
|
||||
std::vector<geometry::PointWithAltitude> junctions;
|
||||
RoutingSession().GetRouteJunctionPoints(junctions);
|
||||
|
||||
junctions.erase(std::unique(junctions.begin(), junctions.end(),
|
||||
[](geometry::PointWithAltitude const & p1, geometry::PointWithAltitude const & p2)
|
||||
{ return AlmostEqualAbs(p1, p2, kMwmPointAccuracy); }),
|
||||
junctions.end());
|
||||
base::Unique(junctions, [](geometry::PointWithAltitude const & p1, geometry::PointWithAltitude const & p2)
|
||||
{ return AlmostEqualAbs(p1, p2, kMwmPointAccuracy); });
|
||||
|
||||
auto const routePoints = GetRoutePoints();
|
||||
std::string const from = GetNameFromPoint(routePoints.front());
|
||||
std::string const to = GetNameFromPoint(routePoints.back());
|
||||
|
||||
return m_bmManager->SaveRoute(junctions, from, to);
|
||||
return m_bmManager->SaveRoute(std::move(junctions), from, to);
|
||||
}
|
||||
|
||||
bool RoutingManager::DisableFollowMode()
|
||||
|
||||
Reference in New Issue
Block a user