Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-06-07 13:22:44 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-06-17 19:36:51 +0300
commit4cac8206b33bf59fb44e039580fe312c31d7a5dd (patch)
tree1fbfd37b3a449c6f2c24af68c711ec65a949b36f /routing/pedestrian_model.cpp
parentf61de40e04d2a75d85c98a5b8743b3c0e0a6d308 (diff)
Review fixes.
Diffstat (limited to 'routing/pedestrian_model.cpp')
-rw-r--r--routing/pedestrian_model.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/routing/pedestrian_model.cpp b/routing/pedestrian_model.cpp
index e2a305a147..7820f390a3 100644
--- a/routing/pedestrian_model.cpp
+++ b/routing/pedestrian_model.cpp
@@ -636,23 +636,23 @@ void PedestrianModel::Init()
SetAdditionalRoadTypes(classif(), arr, ARRAY_SIZE(arr));
}
-bool PedestrianModel::IsNoFoot(feature::TypesHolder const & types) const
+VehicleModel::Restriction PedestrianModel::IsNoFoot(feature::TypesHolder const & types) const
{
- return find(types.begin(), types.end(), m_noFootType) != types.end();
+ return types.Has(m_noFootType) ? Restriction::Yes : Restriction::Unknown;
}
-bool PedestrianModel::IsYesFoot(feature::TypesHolder const & types) const
+VehicleModel::Restriction PedestrianModel::IsYesFoot(feature::TypesHolder const & types) const
{
- return find(types.begin(), types.end(), m_yesFootType) != types.end();
+ return types.Has(m_yesFootType) ? Restriction::Yes : Restriction::Unknown;
}
double PedestrianModel::GetSpeed(FeatureType const & f) const
{
- feature::TypesHolder types(f);
+ feature::TypesHolder const types(f);
- if (IsYesFoot(types))
+ if (IsYesFoot(types) == Restriction::Yes)
return VehicleModel::GetMaxSpeed();
- if (!IsNoFoot(types) && HasRoadType(types))
+ if (IsNoFoot(types) == Restriction::Unknown && HasRoadType(types))
return VehicleModel::GetMinTypeSpeed(types);
return 0.0;
@@ -663,9 +663,9 @@ bool PedestrianModel::IsRoad(FeatureType const & f) const
if (f.GetFeatureType() != feature::GEOM_LINE)
return false;
- feature::TypesHolder types(f);
+ feature::TypesHolder const types(f);
- if (IsNoFoot(types))
+ if (IsNoFoot(types) == Restriction::Yes)
return false;
return VehicleModel::HasRoadType(types);
}