forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
f5920b6904
commit
8c6ace88e5
1 changed files with 1 additions and 7 deletions
|
@ -113,18 +113,12 @@ bool StreetMatches(std::string const & name, std::vector<std::string> const & qu
|
|||
if (nameTokens.empty())
|
||||
return false;
|
||||
|
||||
auto const tokensMatch = [&](std::string const & a, std::string const & b) {
|
||||
bool const sa = search::IsStreetSynonym(strings::MakeUniString(a));
|
||||
bool const sb = search::IsStreetSynonym(strings::MakeUniString(b));
|
||||
return (sa && sb) || a == b;
|
||||
};
|
||||
|
||||
for (size_t i = 0; i + nameTokens.size() <= queryTokens.size(); ++i)
|
||||
{
|
||||
bool found = true;
|
||||
for (size_t j = 0; j < nameTokens.size(); ++j)
|
||||
{
|
||||
if (!tokensMatch(queryTokens[i + j], nameTokens[j]))
|
||||
if (queryTokens[i + j] != nameTokens[j])
|
||||
{
|
||||
found = false;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue