diff --git a/src/word_db.cc b/src/word_db.cc index dcf1a633..193380ac 100644 --- a/src/word_db.cc +++ b/src/word_db.cc @@ -137,12 +137,10 @@ std::vector find_matching(const WordDB::WordList& words, StringV std::vector 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; }