remove some transform calls

for range loop is more readable.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-06-16 17:44:38 -07:00
committed by Jari Sundell
parent 64cb3d11a0
commit 47089bce70
5 changed files with 15 additions and 18 deletions
+2 -3
View File
@@ -353,9 +353,8 @@ f_multicall(core::Download* download, const torrent::Object::list_type& args) {
bool use_regex = true;
if (args.front().is_list())
std::transform(args.front().as_list().begin(), args.front().as_list().end(),
std::back_inserter(regex_list),
std::bind(&torrent::Object::as_string_c, std::placeholders::_1));
for (const auto& o : args.front().as_list())
regex_list.push_back(o.as_string_c());
else if (args.front().is_string() && !args.front().as_string().empty())
regex_list.push_back(args.front().as_string());
else