diff --git a/openlr/helpers.cpp b/openlr/helpers.cpp index 40a8150de..6c1c479d3 100644 --- a/openlr/helpers.cpp +++ b/openlr/helpers.cpp @@ -41,7 +41,7 @@ optional GetFrcScore(Graph::Edge const & e, FunctionalRoadClass functiona Score constexpr kMaxScoreForFrc = 25; if (functionalRoadClass == FunctionalRoadClass::NotAValue) - return nullopt; + return optional(0); auto const hwClass = infoGetter.Get(e.GetFeatureId()).m_hwClass; diff --git a/openlr/score_candidate_paths_getter.cpp b/openlr/score_candidate_paths_getter.cpp index 92985a341..368d8c39a 100644 --- a/openlr/score_candidate_paths_getter.cpp +++ b/openlr/score_candidate_paths_getter.cpp @@ -147,8 +147,7 @@ void ScoreCandidatePathsGetter::GetAllSuitablePaths(ScoreEdgeVec const & startLi for (auto const & e : startLines) { Score roadScore = 0; // Score based on functional road class and form of way. - if (source == LinearSegmentSource::FromLocationReferenceTag && - !PassesRestrictionV3(e.m_edge, functionalRoadClass, formOfWay, m_infoGetter, roadScore)) + if (!PassesRestrictionV3(e.m_edge, functionalRoadClass, formOfWay, m_infoGetter, roadScore)) { continue; } @@ -203,8 +202,7 @@ void ScoreCandidatePathsGetter::GetAllSuitablePaths(ScoreEdgeVec const & startLi CHECK(currentEdge.HasRealPart(), ()); Score roadScore = 0; - if (source == LinearSegmentSource::FromLocationReferenceTag && - !PassesRestrictionV3(e, functionalRoadClass, formOfWay, m_infoGetter, roadScore)) + if (!PassesRestrictionV3(e, functionalRoadClass, formOfWay, m_infoGetter, roadScore)) { continue; }