diff --git a/generator/search_index_builder.cpp b/generator/search_index_builder.cpp index f2a9e7fa36..eaf8f6cb38 100644 --- a/generator/search_index_builder.cpp +++ b/generator/search_index_builder.cpp @@ -349,17 +349,16 @@ void BuildAddressTable(FilesContainerR & container, Writer & writer) ++bounds[streetIndex]; streetMatched = true; } + else + { + ++missing; + } ++address; } if (streetMatched) - { building2Street.PushBack(streetIndex); - } else - { building2Street.PushBackUndefined(); - ++missing; - } } LOG(LINFO, ("Address: Building -> Street (opt, all)", building2Street.GetCount())); diff --git a/search/reverse_geocoder.cpp b/search/reverse_geocoder.cpp index 439b45d553..76c6912740 100644 --- a/search/reverse_geocoder.cpp +++ b/search/reverse_geocoder.cpp @@ -115,8 +115,9 @@ void ReverseGeocoder::GetNearbyAddress(m2::PointD const & center, Address & addr uint32_t ind; - // False result of table->Get(...) means that there're no street - // for a building. Somehow it should be used in a Features Editor. + // TODO (AlexZ): False result of table->Get(...) means that + // there're no street for a building. Somehow it should be used + // in a Features Editor. if (table->Get(b.m_id.m_index, ind) && ind < streets.size()) { addr.m_building = b; diff --git a/search/v2/features_layer_matcher.cpp b/search/v2/features_layer_matcher.cpp index bbdd6291ba..accfa37091 100644 --- a/search/v2/features_layer_matcher.cpp +++ b/search/v2/features_layer_matcher.cpp @@ -75,7 +75,7 @@ uint32_t FeaturesLayerMatcher::GetMatchingStreetImpl(uint32_t houseId, FeatureTy uint32_t streetId = kInvalidId; uint32_t streetIndex; if (!m_houseToStreetTable->Get(houseId, streetIndex)) - streetIndex = streets.size();; + streetIndex = streets.size(); if (streetIndex < streets.size() && streets[streetIndex].m_id.m_mwmId == m_context.m_id) streetId = streets[streetIndex].m_id.m_index; diff --git a/search/v2/house_to_street_table.hpp b/search/v2/house_to_street_table.hpp index 0ee7482786..a92a3fa4d4 100644 --- a/search/v2/house_to_street_table.hpp +++ b/search/v2/house_to_street_table.hpp @@ -18,9 +18,9 @@ public: /// It's better to construct a table from MwmHandle. static unique_ptr Load(MwmValue & value); - // Returns true and stores to |streetIndex| an index number of a - // correct street corresponding to a house in a list of streets - // generated by ReverseGeocoder. Returns false if there're no such + // Returns true and stores to |streetIndex| the index number of the + // correct street corresponding to the house in the list of streets + // generated by ReverseGeocoder. Returns false if there is no such // street. virtual bool Get(uint32_t houseId, uint32_t & streetIndex) const = 0; };