1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Codechange: Use std::range::find_if where possible.

This commit is contained in:
Peter Nelson
2024-11-10 10:57:48 +00:00
committed by Peter Nelson
parent 059a4b22f7
commit fa1849b855
10 changed files with 12 additions and 12 deletions

View File

@@ -167,7 +167,7 @@ bool NetworkCanJoinCompany(CompanyID company_id)
*/
static auto FindKey(auto *authorized_keys, std::string_view authorized_key)
{
return std::find_if(authorized_keys->begin(), authorized_keys->end(), [authorized_key](auto &value) { return StrEqualsIgnoreCase(value, authorized_key); });
return std::ranges::find_if(*authorized_keys, [authorized_key](auto &value) { return StrEqualsIgnoreCase(value, authorized_key); });
}
/**