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:
committed by
Peter Nelson
parent
059a4b22f7
commit
fa1849b855
@@ -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); });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user