diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2019-06-05 16:10:07 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2019-06-05 17:27:41 +0300 |
commit | 6316bc6d1b463ebb454352c1790ee626d9d56be3 (patch) | |
tree | d930996ee33f7c889a40f3f5ac74d6f052efcf08 /routing | |
parent | f70d2ecf6cbef28a0d4e3997209d2c8a0677b446 (diff) |
Declaring kInvalidSpeedKMPH only once.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/features_road_graph.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routing/features_road_graph.cpp b/routing/features_road_graph.cpp index 4a02bc8a56..da5f9ecf10 100644 --- a/routing/features_road_graph.cpp +++ b/routing/features_road_graph.cpp @@ -29,6 +29,7 @@ double constexpr kMwmRoadCrossingRadiusMeters = 2.0; double constexpr kMwmCrossingNodeEqualityRadiusMeters = 100.0; +auto constexpr kInvalidSpeedKMPH = numeric_limits<double>::max(); } // namespace double GetRoadCrossingRadiusMeters() { return kMwmRoadCrossingRadiusMeters; } @@ -132,9 +133,9 @@ public: FeatureID const featureId = ft.GetID(); - auto constexpr invalidSpeed = numeric_limits<double>::max(); - IRoadGraph::RoadInfo const & roadInfo = m_graph.GetCachedRoadInfo(featureId, ft, invalidSpeed); - CHECK_EQUAL(roadInfo.m_speedKMPH, invalidSpeed, ()); + IRoadGraph::RoadInfo const & roadInfo = + m_graph.GetCachedRoadInfo(featureId, ft, kInvalidSpeedKMPH); + CHECK_EQUAL(roadInfo.m_speedKMPH, kInvalidSpeedKMPH, ()); m_edgesLoader(featureId, roadInfo.m_junctions, roadInfo.m_bidirectional); } @@ -181,9 +182,8 @@ void FeaturesRoadGraph::FindClosestEdges(m2::PointD const & point, uint32_t coun FeatureID const featureId = ft.GetID(); - auto constexpr invalidSpeed = numeric_limits<double>::max(); - IRoadGraph::RoadInfo const & roadInfo = GetCachedRoadInfo(featureId, ft, invalidSpeed); - CHECK_EQUAL(roadInfo.m_speedKMPH, invalidSpeed, ()); + IRoadGraph::RoadInfo const & roadInfo = GetCachedRoadInfo(featureId, ft, kInvalidSpeedKMPH); + CHECK_EQUAL(roadInfo.m_speedKMPH, kInvalidSpeedKMPH, ()); finder.AddInformationSource(featureId, roadInfo.m_junctions, roadInfo.m_bidirectional); }; @@ -277,7 +277,7 @@ void FeaturesRoadGraph::ExtractRoadInfo(FeatureID const & featureId, FeatureType } CHECK_EQUAL(altitudes.size(), pointsCount, - ("altitudeLoader->GetAltitudes(", featureId.m_index, "...) returns wrong alititudes:", + ("altitudeLoader->GetAltitudes(", featureId.m_index, "...) returns wrong altitudes:", altitudes)); ri.m_junctions.resize(pointsCount); |