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;
|
||||
for (auto&& word : words)
|
||||
{
|
||||
if ((letters & word.second.letters) != letters)
|
||||
continue;
|
||||
if (func(word.first, str))
|
||||
if ((letters & word.second.letters) == letters and
|
||||
func(word.first, str))
|
||||
res.push_back(word.first);
|
||||
}
|
||||
std::sort(res.begin(), res.end());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user