1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 02:42:42 +01:00

Codechange: Use std::ranges::find where possible.

Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
This commit is contained in:
Peter Nelson
2024-11-10 10:51:26 +00:00
committed by Peter Nelson
parent 1f18894408
commit 3be0166801
31 changed files with 45 additions and 46 deletions

View File

@@ -838,7 +838,7 @@ void ClientNetworkContentSocketHandler::SendReceive()
void ClientNetworkContentSocketHandler::DownloadContentInfo(ContentID cid)
{
/* When we tried to download it already, don't try again */
if (std::find(this->requested.begin(), this->requested.end(), cid) != this->requested.end()) return;
if (std::ranges::find(this->requested, cid) != this->requested.end()) return;
this->requested.push_back(cid);
this->RequestContentList(1, &cid);