Do not sort results of WordDB, simplify code
This commit is contained in:
parent
f32ab5793e
commit
35e7a67c6a
|
@ -137,12 +137,10 @@ std::vector<InternedString> find_matching(const WordDB::WordList& words, StringV
|
||||||
std::vector<InternedString> res;
|
std::vector<InternedString> res;
|
||||||
for (auto&& word : words)
|
for (auto&& word : words)
|
||||||
{
|
{
|
||||||
if ((letters & word.second.letters) != letters)
|
if ((letters & word.second.letters) == letters and
|
||||||
continue;
|
func(word.first, str))
|
||||||
if (func(word.first, str))
|
|
||||||
res.push_back(word.first);
|
res.push_back(word.first);
|
||||||
}
|
}
|
||||||
std::sort(res.begin(), res.end());
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user