RankedMatch constructor handles empty query just fine

This commit is contained in:
Maxime Coste 2016-03-29 13:48:01 +01:00
parent 94f4531bc8
commit 7dd05d675c

View File

@ -133,12 +133,6 @@ RankedMatchList WordDB::find_matching(StringView query)
RankedMatchList res; RankedMatchList res;
for (auto&& word : m_words) for (auto&& word : m_words)
{ {
if (query.empty())
{
res.push_back(RankedMatch{word.first, query});
continue;
}
if (RankedMatch match{word.first, word.second.letters, query, letters}) if (RankedMatch match{word.first, word.second.letters, query, letters})
res.push_back(match); res.push_back(match);
} }