replace various find_if calls

C++11 has shorter equivalents.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-06-16 18:20:51 -07:00
committed by Jari Sundell
parent 47089bce70
commit f0517e2748
7 changed files with 11 additions and 13 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ parse_option_flag(const std::string& option, parse_option_flag_type ftor) {
if (first == next)
throw torrent::input_error(option);
if (std::find_if(next, last, [](char c) { return !std::isspace(c, std::locale::classic()); }) != last)
if (std::any_of(next, last, [](char c) { return !std::isspace(c, std::locale::classic()); }))
throw torrent::input_error(option);
return ftor(std::string(first, next));