diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-03-18 14:03:17 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-03-18 22:38:39 +0300 |
commit | 939620a534af3d58288c4734fa99f3a85f4b587e (patch) | |
tree | 76df5692ecbf2089a693d953c2cb539f539b7fcf /search | |
parent | 67af75dc5b6daec3e784725b7e6ce68d3ae54735 (diff) |
Review fixes.
Diffstat (limited to 'search')
-rw-r--r-- | search/features_layer_matcher.hpp | 10 | ||||
-rw-r--r-- | search/hotels_filter.cpp | 3 |
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); }); |