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>2019-03-13 14:05:26 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2019-03-13 14:05:26 +0300
commitfef44de359a8ae57521680c8e91d1346dd63fe91 (patch)
tree22fada2225e191aae596e86183398a08416a9e10 /openlr/road_info_getter.cpp
parent380b2ef7dd8d1191bc8e569113c078c1a9dc1d14 (diff)
Review fixes.
Diffstat (limited to 'openlr/road_info_getter.cpp')
-rw-r--r--openlr/road_info_getter.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/openlr/road_info_getter.cpp b/openlr/road_info_getter.cpp
index 498478be9f..489f6f329b 100644
--- a/openlr/road_info_getter.cpp
+++ b/openlr/road_info_getter.cpp
@@ -8,6 +8,15 @@
namespace openlr
{
+// RoadInfoGetter::RoadInfo ------------------------------------------------------------------------
+RoadInfoGetter::RoadInfo::RoadInfo(FeatureType & ft)
+ : m_hwClass(ftypes::GetHighwayClass(feature::TypesHolder(ft)))
+ , m_link(ftypes::IsLinkChecker::Instance()(ft))
+ , m_oneWay(ftypes::IsOneWayChecker::Instance()(ft))
+{
+}
+
+// RoadInfoGetter ----------------------------------------------------------------------------------
RoadInfoGetter::RoadInfoGetter(DataSource const & dataSource)
: m_dataSource(dataSource)
{
@@ -23,11 +32,7 @@ RoadInfoGetter::RoadInfo RoadInfoGetter::Get(FeatureID const & fid)
FeatureType ft;
CHECK(g.GetOriginalFeatureByIndex(fid.m_index, ft), ());
- RoadInfo info;
- info.m_hwClass = ftypes::GetHighwayClass(feature::TypesHolder(ft));
- info.m_link = ftypes::IsLinkChecker::Instance()(ft);
- info.m_oneWay = ftypes::IsOneWayChecker::Instance()(ft);
-
+ RoadInfo info(ft);
it = m_cache.emplace(fid, info).first;
return it->second;