Skip to content
Snippets Groups Projects
Commit 77693c6b authored by Tom Fischer's avatar Tom Fischer
Browse files

[A/U/ME] Use std::any_of instead of raw loop.

parent 809ab90a
No related branches found
No related tags found
No related merge requests found
......@@ -79,15 +79,9 @@ int main (int argc, char* argv[])
return EXIT_FAILURE;
}
bool is_keyword(false);
for (auto& keyword : keywords)
{
if (current_key == keyword)
{
is_keyword = true;
break;
}
}
bool const is_keyword = std::any_of(
keywords.begin(), keywords.end(),
[current_key](auto const& keyword) { return current_key == keyword; });
if (!is_keyword)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment