forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
e336eb4b6e
commit
0c8c632d9b
3 changed files with 6 additions and 5 deletions
|
@ -40,7 +40,7 @@ CBV CategoriesCache::Load(MwmContext const & context)
|
|||
|
||||
SearchTrieRequest<strings::LevenshteinDFA> request;
|
||||
|
||||
m_categories.ForEach([&](uint32_t const type) {
|
||||
m_categories.ForEach([&request, &c](uint32_t const type) {
|
||||
request.m_categories.emplace_back(FeatureTypeToString(c.GetIndexForType(type)));
|
||||
});
|
||||
|
||||
|
|
|
@ -288,9 +288,10 @@ void MatchFeaturesInTrie(SearchTrieRequest<DFA> const & request,
|
|||
|
||||
impl::OffsetIntersector<Filter, Value> intersector(filter);
|
||||
|
||||
ForEachLangPrefix(request, trieRoot, [&](TrieRootPrefix<Value> & langRoot, int8_t lang) {
|
||||
MatchInTrie(request.m_names, langRoot, intersector);
|
||||
});
|
||||
ForEachLangPrefix(request, trieRoot,
|
||||
[&request, &intersector](TrieRootPrefix<Value> & langRoot, int8_t /* lang */) {
|
||||
MatchInTrie(request.m_names, langRoot, intersector);
|
||||
});
|
||||
|
||||
if (categoriesMatched)
|
||||
categoriesHolder.ForEachValue(intersector);
|
||||
|
|
|
@ -337,7 +337,7 @@ size_t OrderCountries(m2::RectD const & pivot, vector<shared_ptr<MwmInfo>> & inf
|
|||
|
||||
size_t GetMaxErrorsForToken(UniString const & token)
|
||||
{
|
||||
bool const digitsOnly = all_of(token.begin(), token.end(), [](UniChar c) { return isdigit(c); });
|
||||
bool const digitsOnly = all_of(token.begin(), token.end(), isdigit);
|
||||
if (digitsOnly)
|
||||
return 0;
|
||||
if (token.size() < 4)
|
||||
|
|
Loading…
Add table
Reference in a new issue