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:
authorYuri Gorshenin <y@maps.me>2016-01-07 17:02:45 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:03:27 +0300
commit7342d2a825aa4f7bc05fa6a554551924558b438e (patch)
treed6fb20fe49f2c9d8a4b13af3f6f659f120a645b6 /indexer/ftypes_matcher.cpp
parentde3caa14e222b24eff52e7406e9550181c58d4e1 (diff)
Review fixes.
Diffstat (limited to 'indexer/ftypes_matcher.cpp')
-rw-r--r--indexer/ftypes_matcher.cpp46
1 files changed, 22 insertions, 24 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp
index c927b64f54..11b2f7da35 100644
--- a/indexer/ftypes_matcher.cpp
+++ b/indexer/ftypes_matcher.cpp
@@ -107,33 +107,31 @@ IsRailwayStationChecker const & IsRailwayStationChecker::Instance()
return inst;
}
-// TODO (@y, @m, @vng): this list must be up-to-date with
-// data/categories.txt, so, it worth to generate or parse it from that
-// file.
-// static
-vector<vector<string>> const IsStreetChecker::kPaths = {{"highway", "living_street"},
- {"highway", "motorway"},
- {"highway", "motorway_link"},
- {"highway", "pedestrian"},
- {"highway", "primary"},
- {"highway", "primary_link"},
- {"highway", "residential"},
- {"highway", "road"},
- {"highway", "secondary"},
- {"highway", "secondary_link"},
- {"highway", "service"},
- {"highway", "tertiary"},
- {"highway", "tertiary_link"},
- {"highway", "track"},
- {"highway", "trunk"},
- {"highway", "trunk_link"},
- {"highway", "unclassified"}};
-
IsStreetChecker::IsStreetChecker()
{
+ // TODO (@y, @m, @vng): this list must be up-to-date with
+ // data/categories.txt, so, it worth to generate or parse it from that
+ // file.
Classificator const & c = classif();
- for (auto const & path : kPaths)
- m_types.push_back(c.GetTypeByPath(path));
+ char const * arr[][2] = {{"highway", "living_street"},
+ {"highway", "motorway"},
+ {"highway", "motorway_link"},
+ {"highway", "pedestrian"},
+ {"highway", "primary"},
+ {"highway", "primary_link"},
+ {"highway", "residential"},
+ {"highway", "road"},
+ {"highway", "secondary"},
+ {"highway", "secondary_link"},
+ {"highway", "service"},
+ {"highway", "tertiary"},
+ {"highway", "tertiary_link"},
+ {"highway", "track"},
+ {"highway", "trunk"},
+ {"highway", "trunk_link"},
+ {"highway", "unclassified"}};
+ for (auto const & p : arr)
+ m_types.push_back(c.GetTypeByPath({p[0], p[1]}));
}
IsStreetChecker const & IsStreetChecker::Instance()