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:
authortatiana-yan <tatiana.kondakova@gmail.com>2018-11-12 12:07:18 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-11-14 16:57:10 +0300
commitb739e306b85e285c7474573f1f4a4232d4239ff7 (patch)
tree31a659f065ad0a5f4a398822060346239b0fa52a
parent5e2e3254594a5e2cc4e009a3c3e2cb7bdb17728c (diff)
[index] Make IsEatChecker consistent with new eat category.
-rw-r--r--generator/emitter_restaurants.cpp2
-rw-r--r--generator/opentable_dataset.cpp2
-rw-r--r--indexer/ftypes_matcher.cpp6
-rw-r--r--indexer/ftypes_matcher.hpp6
-rw-r--r--search/categories_cache.cpp2
-rw-r--r--search/processor.cpp2
-rw-r--r--ugc/ugc_tests/storage_tests.cpp2
7 files changed, 12 insertions, 10 deletions
diff --git a/generator/emitter_restaurants.cpp b/generator/emitter_restaurants.cpp
index 14124815e2..6512e34ae6 100644
--- a/generator/emitter_restaurants.cpp
+++ b/generator/emitter_restaurants.cpp
@@ -12,7 +12,7 @@ EmitterRestaurants::EmitterRestaurants(std::vector<FeatureBuilder1> & features)
void EmitterRestaurants::operator()(FeatureBuilder1 & fb)
{
- if (!ftypes::IsFoodChecker::Instance()(fb.GetParams().m_types) || fb.GetParams().name.IsEmpty())
+ if (!ftypes::IsEatChecker::Instance()(fb.GetParams().m_types) || fb.GetParams().name.IsEmpty())
{
++m_stats.m_unexpectedFeatures;
return;
diff --git a/generator/opentable_dataset.cpp b/generator/opentable_dataset.cpp
index 1b2e7fc09d..d53f879adb 100644
--- a/generator/opentable_dataset.cpp
+++ b/generator/opentable_dataset.cpp
@@ -40,7 +40,7 @@ bool OpentableDataset::NecessaryMatchingConditionHolds(FeatureBuilder1 const & f
if (fb.GetName(StringUtf8Multilang::kDefaultCode).empty())
return false;
- return ftypes::IsFoodChecker::Instance()(fb.GetTypes());
+ return ftypes::IsEatChecker::Instance()(fb.GetTypes());
}
template <>
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp
index aa7c19e15b..4a82b7eb86 100644
--- a/indexer/ftypes_matcher.cpp
+++ b/indexer/ftypes_matcher.cpp
@@ -379,15 +379,17 @@ IsWifiChecker::IsWifiChecker()
m_types.push_back(classif().GetTypeByPath({"internet_access", "wlan"}));
}
-IsFoodChecker:: IsFoodChecker()
+IsEatChecker:: IsEatChecker()
{
Classificator const & c = classif();
char const * const paths[][2] = {
{"amenity", "cafe"},
{"amenity", "bar"},
+ {"amenity", "biergarden"},
{"amenity", "pub"},
{"amenity", "fast_food"},
- {"amenity", "restaurant"}
+ {"amenity", "restaurant"},
+ {"shop", "bakery"}
};
for (auto const & path : paths)
m_types.push_back(c.GetTypeByPath({path[0], path[1]}));
diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp
index bb591955bf..745abb9072 100644
--- a/indexer/ftypes_matcher.hpp
+++ b/indexer/ftypes_matcher.hpp
@@ -214,11 +214,11 @@ public:
DECLARE_CHECKER_INSTANCE(IsWifiChecker);
};
-class IsFoodChecker : public BaseChecker
+class IsEatChecker : public BaseChecker
{
- IsFoodChecker();
+ IsEatChecker();
public:
- DECLARE_CHECKER_INSTANCE(IsFoodChecker);
+ DECLARE_CHECKER_INSTANCE(IsEatChecker);
std::vector<uint32_t> const & GetTypes() const { return m_types; }
};
diff --git a/search/categories_cache.cpp b/search/categories_cache.cpp
index df090e1d68..a9356e8e21 100644
--- a/search/categories_cache.cpp
+++ b/search/categories_cache.cpp
@@ -70,7 +70,7 @@ HotelsCache::HotelsCache(base::Cancellable const & cancellable)
// FoodCache ---------------------------------------------------------------------------------------
FoodCache::FoodCache(base::Cancellable const & cancellable)
- : CategoriesCache(ftypes::IsFoodChecker::Instance(), cancellable)
+ : CategoriesCache(ftypes::IsEatChecker::Instance(), cancellable)
{
}
} // namespace search
diff --git a/search/processor.cpp b/search/processor.cpp
index 3ceb0e7676..6604a05566 100644
--- a/search/processor.cpp
+++ b/search/processor.cpp
@@ -288,7 +288,7 @@ void Processor::SetQuery(string const & query)
if (isCuisineRequest)
{
m_isCategorialRequest = true;
- m_preferredTypes = ftypes::IsFoodChecker::Instance().GetTypes();
+ m_preferredTypes = ftypes::IsEatChecker::Instance().GetTypes();
}
}
diff --git a/ugc/ugc_tests/storage_tests.cpp b/ugc/ugc_tests/storage_tests.cpp
index 909700a472..9a1e20e500 100644
--- a/ugc/ugc_tests/storage_tests.cpp
+++ b/ugc/ugc_tests/storage_tests.cpp
@@ -126,7 +126,7 @@ public:
FeatureID FeatureIdForCafeAtPoint(m2::PointD const & mercator)
{
- return FeatureIdForPoint(mercator, ftypes::IsFoodChecker::Instance());
+ return FeatureIdForPoint(mercator, ftypes::IsEatChecker::Instance());
}
FeatureID FeatureIdForRailwayAtPoint(m2::PointD const & mercator)