[routing] SaveRoute minor fixes and CHECK.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako
2025-07-17 08:23:04 -03:00
committed by Konstantin Pastbin
parent c4599f4889
commit b107638b8b
4 changed files with 17 additions and 32 deletions

View File

@@ -1,8 +1,5 @@
#include "routing/routing_session.hpp"
#include "routing/routing_helpers.hpp"
#include "routing/speed_camera.hpp"
#include "platform/distance.hpp"
#include "platform/location.hpp"
#include "platform/measurement_utils.hpp"
@@ -789,15 +786,12 @@ bool RoutingSession::GetRouteJunctionPoints(std::vector<geometry::PointWithAltit
return false;
auto const & segments = m_route->GetRouteSegments();
CHECK(!segments.empty(), ());
routeJunctionPoints.reserve(segments.size());
for (auto const & s : segments)
routeJunctionPoints.push_back(s.GetJunction());
for (size_t i = 0; i < segments.size(); ++i)
{
auto const & junction = segments[i].GetJunction();
routeJunctionPoints.push_back(junction);
}
ASSERT_EQUAL(routeJunctionPoints.size(), routeJunctionPoints.size(), ());
return true;
}