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

Method AddRoutePoint

libs/map/routing_manager.cpp:946–967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946void RoutingManager::AddRoutePoint(RouteMarkData && markData, bool reorderIntermediatePoints)
947{
948 ASSERT(m_bmManager != nullptr, ());
949 RoutePointsLayout routePoints(*m_bmManager);
950
951 // Always replace start and finish points.
952 if (markData.m_pointType == RouteMarkType::Start || markData.m_pointType == RouteMarkType::Finish)
953 routePoints.RemoveRoutePoint(markData.m_pointType);
954
955 if (markData.m_isMyPosition)
956 {
957 RouteMarkPoint const * mark = routePoints.GetMyPositionPoint();
958 if (mark != nullptr)
959 routePoints.RemoveRoutePoint(mark->GetRoutePointType(), mark->GetIntermediateIndex());
960 }
961
962 markData.m_isVisible = !markData.m_isMyPosition;
963 routePoints.AddRoutePoint(std::move(markData));
964
965 if (reorderIntermediatePoints)
966 ReorderIntermediatePoints();
967}
968
969void RoutingManager::ContinueRouteToPoint(RouteMarkData && markData)
970{

Callers 2

ContinueRouteToPointMethod · 0.45

Calls 5

ASSERTFunction · 0.85
GetMyPositionPointMethod · 0.80
GetRoutePointTypeMethod · 0.80
RemoveRoutePointMethod · 0.45
GetIntermediateIndexMethod · 0.45

Tested by

no test coverage detected