diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-07-19 17:22:26 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-07-23 10:25:11 +0300 |
commit | 18067c6270fa7edbc6b391468971d3aaa3a7df95 (patch) | |
tree | 76c4bf51fa916127d282b0f6be89c402ee3654f7 /routing | |
parent | 3fa7071a1b57145da7559144f2316ad3be555d39 (diff) |
Review fixes.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/nearest_edge_finder.cpp | 10 | ||||
-rw-r--r-- | routing/routing_helpers.hpp | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/routing/nearest_edge_finder.cpp b/routing/nearest_edge_finder.cpp index 181eda1cf9..7c8f2ff867 100644 --- a/routing/nearest_edge_finder.cpp +++ b/routing/nearest_edge_finder.cpp @@ -42,12 +42,10 @@ void NearestEdgeFinder::AddInformationSource(FeatureID const & featureId, IRoadG // to segment [res.m_segStart.GetPoint(), res.m_segEnd.GetPoint()]. // It's necessary to calculate exact value of res.m_projPoint.GetAltitude() by this // information. - bool const isAltidudeValid = res.m_segStart.GetAltitude() != feature::kInvalidAltitude && - res.m_segEnd.GetAltitude() != feature::kInvalidAltitude; - feature::TAltitude const projPointAlt = - isAltidudeValid ? static_cast<feature::TAltitude>( - (res.m_segStart.GetAltitude() + res.m_segEnd.GetAltitude()) / 2) - : feature::kInvalidAltitude; + bool const isAltitude = res.m_segStart.GetAltitude() != feature::kInvalidAltitude && + res.m_segEnd.GetAltitude() != feature::kInvalidAltitude; + feature::TAltitude const projPointAlt = isAltitude ? static_cast<feature::TAltitude>( + (res.m_segStart.GetAltitude() + res.m_segEnd.GetAltitude()) / 2) : feature::kInvalidAltitude; res.m_projPoint = Junction(pt, projPointAlt); } } diff --git a/routing/routing_helpers.hpp b/routing/routing_helpers.hpp index c602fbd453..ef6c9d5e40 100644 --- a/routing/routing_helpers.hpp +++ b/routing/routing_helpers.hpp @@ -6,7 +6,7 @@ namespace routing { -/// \returns true if a feature with |types| can be used for any kind of routing. +/// \returns true when there exists a routing mode where the feature with |types| can be used. template <class TList> bool IsRoad(TList const & types) { |