Review fixes.

This commit is contained in:
Yuri Gorshenin 2015-12-22 14:53:21 +03:00 committed by Sergey Yershov
parent 2f51f39aa3
commit ec7c9df7f2
2 changed files with 4 additions and 5 deletions

View file

@ -133,7 +133,7 @@ private:
vector<string> queryTokens;
NormalizeHouseNumber(child.m_subQuery, queryTokens);
bool const queryLooksLikeHouseNumber =
feature::IsHouseNumber(child.m_subQuery) && !queryTokens.empty();
!queryTokens.empty() && feature::IsHouseNumber(child.m_subQuery);
uint32_t numFilterInvocations = 0;
auto filter = [&](uint32_t id, FeatureType & feature) -> bool
@ -186,7 +186,7 @@ private:
ReverseGeocoder m_reverseGeocoder;
// Cache of streets in a feature's vicinity. All lists in the cache
// are ordered by a distance.
// are ordered by distance.
unordered_map<uint32_t, vector<ReverseGeocoder::Street>> m_nearbyStreetsCache;
// Cache of correct streets for buildings. Current search algorithm

View file

@ -237,9 +237,8 @@ void Geocoder::DoGeocoding(size_t curToken)
// DoGeocoding(). This may lead to use-after-free.
auto & layer = m_layers.back();
// Following code intersects posting lists for tokens [curToken,
// curToken + n). This can be done incrementally, as we have
// |clusters| to store intersections.
// Following code intersects posting lists for [curToken, curToken + n).
// This can be done incrementally, as we store intersections in |clusters|.
if (n == 1)
{
layer.m_sortedFeatures = &partition.m_clusters[i];