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

Codechange: Replaced SmallVector::Contains() with std::find() pattern

This commit is contained in:
Henry Wilson
2019-02-12 22:59:12 +00:00
committed by PeterN
parent b1f5119d3a
commit 5795f66d2e
8 changed files with 16 additions and 25 deletions

View File

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