adjust keystroke length

This commit is contained in:
Paul Pan 2023-11-03 21:28:08 +08:00
parent c968055466
commit beea7f66c8
2 changed files with 3 additions and 4 deletions

View File

@ -69,7 +69,7 @@ void stat_keystroke(const DataSource &source) {
}
}
if (max_len >= 4) stat[longest]++;
if (max_len > 5) stat[longest]++;
}
std::vector<std::pair<std::string, size_t>> vec(stat.begin(), stat.end());

View File

@ -15,9 +15,8 @@ static BufStatus data_buf_ok[2] = {BufStatus::INIT, BufStatus::INIT};
std::generator<std::string> passwords(const DataSource &source) {
if (data_buf_ok[magic_enum::enum_integer(source)] == BufStatus::DONE) {
for (auto const &password : data_buf[magic_enum::enum_integer(source)]) {
for (auto const &password : data_buf[magic_enum::enum_integer(source)])
co_yield password;
}
co_return;
}