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>2015-05-14 14:26:26 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:48:01 +0300
commit3397cbcfb8f87100d23c7a6d897016ad16b5cdcf (patch)
treeb22d5381e54fa0d496e551a522f62e3dbf881223 /indexer/ftypes_matcher.cpp
parent3ee9969263c2fe2278cad5f3d62594804ae6d7ce (diff)
Fixing incoming edge turn generation in some cases.
Diffstat (limited to 'indexer/ftypes_matcher.cpp')
-rw-r--r--indexer/ftypes_matcher.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp
index 7e3196a08a..23d54acb0c 100644
--- a/indexer/ftypes_matcher.cpp
+++ b/indexer/ftypes_matcher.cpp
@@ -314,7 +314,7 @@ string DebugPrint(HighwayClass const cls)
case HighwayClass::LivingStreet: out << "LivingStreet";
case HighwayClass::Service: out << "Service";
case HighwayClass::Count: out << "Count";
- default: out <<"Unknown value of HighwayClass: " << static_cast<int>(cls);
+ default: out << "Unknown value of HighwayClass: " << static_cast<int>(cls);
}
out << " ]";
return out.str();
@@ -345,10 +345,11 @@ HighwayClass GetHighwayClass(feature::TypesHolder const & types)
for (auto t : types)
{
ftype::TruncValue(t, kTruncLevel);
- auto const it = find_if(kHighwayClasses.cbegin(), kHighwayClasses.cend(),
- [t](pair<HighwayClass, uint32_t> const & p){ return p.second == t; });
- if (it != kHighwayClasses.cend())
- return it->first;
+ for (auto const & cls : kHighwayClasses)
+ {
+ if (cls.second == t)
+ return cls.first;
+ }
}
return HighwayClass::None;