MCPcopy Create free account
hub / github.com/comaps/comaps / SetRouteSegments

Method SetRouteSegments

libs/routing/route.cpp:355–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void Route::SetRouteSegments(vector<RouteSegment> && routeSegments)
356{
357 vector<size_t> fakeSegmentIndexes;
358 m_routeSegments = std::move(routeSegments);
359 m_haveAltitudes = true;
360 for (size_t i = 0; i < m_routeSegments.size(); ++i)
361 {
362 if (m_haveAltitudes && m_routeSegments[i].GetJunction().GetAltitude() == geometry::kInvalidAltitude)
363 m_haveAltitudes = false;
364
365 if (!m_routeSegments[i].GetSegment().IsRealSegment())
366 fakeSegmentIndexes.push_back(i);
367 }
368
369 m_poly.SetFakeSegmentIndexes(std::move(fakeSegmentIndexes));
370}
371
372bool Route::MoveIterator(location::GpsInfo const & info)
373{

Callers 4

ReconstructRouteFunction · 0.80
CalculateRouteMethod · 0.80
UNIT_TESTFunction · 0.80
FillSubroutesInfoFunction · 0.80

Calls 6

GetSegmentMethod · 0.80
SetFakeSegmentIndexesMethod · 0.80
sizeMethod · 0.45
GetAltitudeMethod · 0.45
IsRealSegmentMethod · 0.45
push_backMethod · 0.45

Tested by 2

UNIT_TESTFunction · 0.64
FillSubroutesInfoFunction · 0.64