From 16dfc4ce52680da2b5cbb4a33ce67cb6503e1901 Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Mon, 13 Dec 2021 15:48:24 +0300 Subject: [PATCH] [generator] Use ref in public_transport=platform. Signed-off-by: Viktor Govako --- generator/feature_builder.cpp | 3 ++- indexer/ftypes_matcher.cpp | 7 +++++++ indexer/ftypes_matcher.hpp | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp index 0d779387dc..0df3bfa365 100644 --- a/generator/feature_builder.cpp +++ b/generator/feature_builder.cpp @@ -233,7 +233,8 @@ bool FeatureBuilder::PreSerialize() ftypes::IsRailwaySubwayEntranceChecker::Instance()(types) || ftypes::IsEntranceChecker::Instance()(types) || ftypes::IsRailwayStationChecker::Instance()(types) || - ftypes::IsAerowayGateChecker::Instance()(types)))) + ftypes::IsAerowayGateChecker::Instance()(types) || + ftypes::IsPlatformChecker::Instance()(types)))) { m_params.name.AddString(StringUtf8Multilang::kDefaultCode, m_params.ref); } diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index 6473487f4c..04df51bcdf 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -881,6 +881,13 @@ IsRailwaySubwayEntranceChecker::IsRailwaySubwayEntranceChecker() m_types.push_back(c.GetTypeByPath({"railway", "subway_entrance"})); } +IsPlatformChecker::IsPlatformChecker() +{ + Classificator const & c = classif(); + m_types.push_back(c.GetTypeByPath({"railway", "platform"})); + m_types.push_back(c.GetTypeByPath({"public_transport", "platform"})); +} + IsAddressInterpolChecker::IsAddressInterpolChecker() : BaseChecker(1 /* level */) { Classificator const & c = classif(); diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index 52469a168d..3f591d203b 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -587,6 +587,14 @@ public: DECLARE_CHECKER_INSTANCE(IsRailwaySubwayEntranceChecker); }; +class IsPlatformChecker : public BaseChecker +{ + IsPlatformChecker(); + +public: + DECLARE_CHECKER_INSTANCE(IsPlatformChecker); +}; + class IsAddressInterpolChecker : public BaseChecker { IsAddressInterpolChecker();