Simplify captcha_valid().

This commit is contained in:
tastytea 2021-01-18 08:20:39 +01:00
parent c564e79dbc
commit 7e6e47b191
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 5 deletions

View File

@ -200,11 +200,7 @@ string text2html(string text)
bool captcha_valid(std::uint8_t id, const string_view answer)
{
std::array<string, 6> answers{"2", "6", "17", "12", "4", "1"};
if (answers.at(id) == answer)
{
return true;
}
return false;
return answers.at(id) == answer;
}
bool is_spam(const entry_type &entry)