mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 20:52:30 +00:00
replace various find_if calls
C++11 has shorter equivalents. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
47089bce70
commit
f0517e2748
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user