refactor: fix readability-redundant-string-cstr warnings found by clang-tidy-16 (#4529)

This commit is contained in:
Charles Kerr
2023-01-03 21:43:54 -06:00
committed by GitHub
parent dc968892ec
commit ee0877c99d
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -382,10 +382,7 @@ static bool isHostnameAllowed(tr_rpc_server const* server, evhttp_request const*
}
auto const& src = server->host_whitelist_;
return std::any_of(
std::begin(src),
std::end(src),
[&hostname](auto const& str) { return tr_wildmat(hostname.c_str(), str.c_str()); });
return std::any_of(std::begin(src), std::end(src), [&hostname](auto const& str) { return tr_wildmat(hostname, str); });
}
static bool test_session_id(tr_rpc_server const* server, evhttp_request const* req)