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
path: root/search
diff options
context:
space:
mode:
authortatiana-yan <tatiana.kondakova@gmail.com>2019-03-18 14:03:17 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-03-18 22:38:39 +0300
commit939620a534af3d58288c4734fa99f3a85f4b587e (patch)
tree76df5692ecbf2089a693d953c2cb539f539b7fcf /search
parent67af75dc5b6daec3e784725b7e6ce68d3ae54735 (diff)
Review fixes.
Diffstat (limited to 'search')
-rw-r--r--search/features_layer_matcher.hpp10
-rw-r--r--search/hotels_filter.cpp3
2 files changed, 7 insertions, 6 deletions
diff --git a/search/features_layer_matcher.hpp b/search/features_layer_matcher.hpp
index a584d6ddf1..d247d81671 100644
--- a/search/features_layer_matcher.hpp
+++ b/search/features_layer_matcher.hpp
@@ -123,10 +123,11 @@ private:
for (size_t i = 0; i < pois.size(); ++i)
{
- auto poiFt = GetByIndex(pois[i]);
- if (poiFt)
+ if (auto poiFt = GetByIndex(pois[i]))
+ {
poiCenters.emplace_back(feature::GetCenter(*poiFt, FeatureType::WORST_GEOMETRY),
i /* id */);
+ }
}
std::vector<PointRectMatcher::RectIdPair> buildingRects;
@@ -204,10 +205,11 @@ private:
for (size_t i = 0; i < pois.size(); ++i)
{
- auto poiFt = GetByIndex(pois[i]);
- if (poiFt)
+ if (auto poiFt = GetByIndex(pois[i]))
+ {
poiCenters.emplace_back(feature::GetCenter(*poiFt, FeatureType::WORST_GEOMETRY),
i /* id */);
+ }
}
std::vector<PointRectMatcher::RectIdPair> streetRects;
diff --git a/search/hotels_filter.cpp b/search/hotels_filter.cpp
index b0c35698e7..3e400a44ad 100644
--- a/search/hotels_filter.cpp
+++ b/search/hotels_filter.cpp
@@ -118,8 +118,7 @@ HotelsFilter::Descriptions const & HotelsFilter::GetDescriptions(MwmContext cons
auto const id = base::asserted_cast<uint32_t>(bit);
Description description;
- auto ft = context.GetFeature(id);
- if (ft)
+ if (auto ft = context.GetFeature(id))
description.FromFeature(*ft);
descriptions.emplace_back(id, description);
});