mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 20:24:12 +01:00
Codechange: Use std::range::find_if where possible.
This commit is contained in:
committed by
Peter Nelson
parent
059a4b22f7
commit
fa1849b855
@@ -363,7 +363,7 @@ NetworkAuthenticationServerHandler::ResponseResult X25519AuthenticationHandler::
|
||||
NetworkAuthenticationMethod method = static_cast<NetworkAuthenticationMethod>(p.Recv_uint8());
|
||||
|
||||
auto is_of_method = [method](Handler &handler) { return handler->GetAuthenticationMethod() == method; };
|
||||
auto it = std::find_if(handlers.begin(), handlers.end(), is_of_method);
|
||||
auto it = std::ranges::find_if(handlers, is_of_method);
|
||||
if (it == handlers.end()) return INVALID;
|
||||
|
||||
this->current_handler = it->get();
|
||||
|
||||
Reference in New Issue
Block a user