Simplify captcha_valid().
This commit is contained in:
parent
c564e79dbc
commit
7e6e47b191
|
@ -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)
|
||||
|
|
Reference in New Issue