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-10-13 13:21:25 +0300
committerYuri Gorshenin <y@maps.me>2016-10-13 13:25:59 +0300
commita59b30b3da5c46c352922328b28fdc253dd17d01 (patch)
tree5870ad4ec5a097a2fdb1b1747c0d24f86204939a /search/hotels_filter.cpp
parentcf0df96760583eb3380e9cc7969cbc4dcd8943ab (diff)
[search] Identity checks for hotels filter.
Diffstat (limited to 'search/hotels_filter.cpp')
-rw-r--r--search/hotels_filter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/search/hotels_filter.cpp b/search/hotels_filter.cpp
index 10f335a39f..9a64085449 100644
--- a/search/hotels_filter.cpp
+++ b/search/hotels_filter.cpp
@@ -42,6 +42,23 @@ void Description::FromFeature(FeatureType & ft)
}
}
+// Rule --------------------------------------------------------------------------------------------
+// static
+bool Rule::IsIdentical(shared_ptr<Rule> const & lhs, shared_ptr<Rule> const & rhs)
+{
+ if (lhs && !rhs)
+ return false;
+ if (!lhs && rhs)
+ return false;
+
+ if (lhs && rhs && !lhs->IdenticalTo(*rhs))
+ return false;
+
+ return true;
+}
+
+string DebugPrint(Rule const & rule) { return rule.ToString(); }
+
// HotelsFilter::ScopedFilter ----------------------------------------------------------------------
HotelsFilter::ScopedFilter::ScopedFilter(MwmSet::MwmId const & mwmId,
Descriptions const & descriptions, shared_ptr<Rule> rule)