MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnDownloadComplete

Method OnDownloadComplete

src/network/network_content.cpp:1092–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090}
1091
1092void ClientNetworkContentSocketHandler::OnDownloadComplete(ContentID cid)
1093{
1094 ContentInfo *ci = this->GetContent(cid);
1095 if (ci != nullptr) {
1096 ci->state = ContentInfo::State::AlreadyHere;
1097 }
1098
1099 for (size_t i = 0; i < this->callbacks.size(); /* nothing */) {
1100 ContentCallback *cb = this->callbacks[i];
1101 /* the callback may remove itself from this->callbacks */
1102 cb->OnDownloadComplete(cid);
1103 if (i != this->callbacks.size() && this->callbacks[i] == cb) i++;
1104 }
1105}

Callers 1

AfterDownloadMethod · 0.95

Calls 2

GetContentMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected