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

Function PassesRestriction

tools/openlr/helpers.cpp:157–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool PassesRestriction(Graph::Edge const & e, FunctionalRoadClass restriction, FormOfWay formOfWay, int frcThreshold,
158 RoadInfoGetter & infoGetter)
159{
160 if (e.IsFake() || restriction == FunctionalRoadClass::NotAValue)
161 return true;
162
163 auto const frc = HighwayClassToFunctionalRoadClass(infoGetter.Get(e.GetFeatureId()).m_hwClass);
164 return static_cast<int>(frc) <= static_cast<int>(restriction) + frcThreshold;
165}
166
167bool PassesRestrictionV3(Graph::Edge const & e, FunctionalRoadClass functionalRoadClass, FormOfWay formOfWay,
168 RoadInfoGetter & infoGetter, Score & score)

Callers 1

GetAllSuitablePathsMethod · 0.85

Calls 4

IsFakeMethod · 0.45
GetMethod · 0.45
GetFeatureIdMethod · 0.45

Tested by

no test coverage detected